mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
require name != NULL in *byname
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.h,v 1.12 2000/03/04 00:43:40 tale Exp $ */
|
||||
/* $Id: log.h,v 1.13 2000/03/04 16:41:14 tale Exp $ */
|
||||
|
||||
#ifndef ISC_LOG_H
|
||||
#define ISC_LOG_H 1
|
||||
@@ -727,6 +727,10 @@ isc_log_categorybyname(isc_log_t *lctx, const char *name);
|
||||
* Notes:
|
||||
* The string name of a category is not required to be unique.
|
||||
*
|
||||
* Requires:
|
||||
* lctx is a valid context.
|
||||
* name is not NULL.
|
||||
*
|
||||
* Returns:
|
||||
* A pointer to the _first_ isc_logcategory_t structure used by "name".
|
||||
*
|
||||
@@ -741,6 +745,10 @@ isc_log_modulebyname(isc_log_t *lctx, const char *name);
|
||||
* Notes:
|
||||
* The string name of a module is not required to be unique.
|
||||
*
|
||||
* Requires:
|
||||
* lctx is a valid context.
|
||||
* name is not NULL.
|
||||
*
|
||||
* Returns:
|
||||
* A pointer to the _first_ isc_logmodule_t structure used by "name".
|
||||
*
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.c,v 1.19 2000/03/04 00:43:38 tale Exp $ */
|
||||
/* $Id: log.c,v 1.20 2000/03/04 16:39:54 tale Exp $ */
|
||||
|
||||
/* Principal Authors: DCL */
|
||||
|
||||
@@ -531,6 +531,7 @@ isc_log_categorybyname(isc_log_t *lctx, const char *name) {
|
||||
isc_logcategory_t *catp;
|
||||
|
||||
REQUIRE(VALID_CONTEXT(lctx));
|
||||
REQUIRE(name != NULL);
|
||||
|
||||
for (catp = lctx->categories; catp->name != NULL; catp++)
|
||||
if (catp->id == UINT_MAX)
|
||||
@@ -585,6 +586,7 @@ isc_log_modulebyname(isc_log_t *lctx, const char *name) {
|
||||
isc_logmodule_t *modp;
|
||||
|
||||
REQUIRE(VALID_CONTEXT(lctx));
|
||||
REQUIRE(name != NULL);
|
||||
|
||||
for (modp = lctx->modules; modp->name != NULL; modp++)
|
||||
if (modp->id == UINT_MAX)
|
||||
|
Reference in New Issue
Block a user