mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
use %u rather than %d; pass a unsigned int pointer
This commit is contained in:
@@ -10827,7 +10827,7 @@ named_server_setdebuglevel(named_server_t *server, isc_lex_t *lex) {
|
|||||||
isc_log_setdebuglevel(named_g_lctx, named_g_debuglevel);
|
isc_log_setdebuglevel(named_g_lctx, named_g_debuglevel);
|
||||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||||
"debug level is now %d", named_g_debuglevel);
|
"debug level is now %u", named_g_debuglevel);
|
||||||
return (ISC_R_SUCCESS);
|
return (ISC_R_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11383,7 +11383,7 @@ named_server_tsigdelete(named_server_t *server, isc_lex_t *lex,
|
|||||||
}
|
}
|
||||||
isc_task_endexclusive(server->task);
|
isc_task_endexclusive(server->task);
|
||||||
|
|
||||||
snprintf(fbuf, sizeof(fbuf), "%d", foundkeys);
|
snprintf(fbuf, sizeof(fbuf), "%u", foundkeys);
|
||||||
|
|
||||||
CHECK(putstr(text, fbuf));
|
CHECK(putstr(text, fbuf));
|
||||||
CHECK(putstr(text, " tsig keys deleted."));
|
CHECK(putstr(text, " tsig keys deleted."));
|
||||||
@@ -14813,9 +14813,11 @@ named_server_dnstap(named_server_t *server, isc_lex_t *lex,
|
|||||||
unsigned int n;
|
unsigned int n;
|
||||||
ptr = next_token(lex, text);
|
ptr = next_token(lex, text);
|
||||||
if (ptr != NULL) {
|
if (ptr != NULL) {
|
||||||
n = sscanf(ptr, "%u", &backups);
|
unsigned int u;
|
||||||
if (n != 1U)
|
n = sscanf(ptr, "%u", &u);
|
||||||
|
if (n != 1U || u > INT_MAX)
|
||||||
return (ISC_R_BADNUMBER);
|
return (ISC_R_BADNUMBER);
|
||||||
|
backups = u;
|
||||||
} else {
|
} else {
|
||||||
backups = ISC_LOG_ROLLINFINITE;
|
backups = ISC_LOG_ROLLINFINITE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user