2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

use %u rather than %d; pass a unsigned int pointer

This commit is contained in:
Mark Andrews 2018-02-14 18:06:09 +11:00
parent 89ff72bea0
commit f5ee6f7292

View File

@ -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_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
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);
}
@ -11383,7 +11383,7 @@ named_server_tsigdelete(named_server_t *server, isc_lex_t *lex,
}
isc_task_endexclusive(server->task);
snprintf(fbuf, sizeof(fbuf), "%d", foundkeys);
snprintf(fbuf, sizeof(fbuf), "%u", foundkeys);
CHECK(putstr(text, fbuf));
CHECK(putstr(text, " tsig keys deleted."));
@ -14813,9 +14813,11 @@ named_server_dnstap(named_server_t *server, isc_lex_t *lex,
unsigned int n;
ptr = next_token(lex, text);
if (ptr != NULL) {
n = sscanf(ptr, "%u", &backups);
if (n != 1U)
unsigned int u;
n = sscanf(ptr, "%u", &u);
if (n != 1U || u > INT_MAX)
return (ISC_R_BADNUMBER);
backups = u;
} else {
backups = ISC_LOG_ROLLINFINITE;
}