mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 08:05:21 +00:00
Add ISC_FORMAT_PRINTF to report's declaration
dns_dnssec_updatekeys's 'report' could be called with invalid arguments which the compiler should be be able to detect.
This commit is contained in:
@@ -1885,7 +1885,8 @@ failure:
|
|||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
publish_key(dns_diff_t *diff, dns_dnsseckey_t *key, const dns_name_t *origin,
|
publish_key(dns_diff_t *diff, dns_dnsseckey_t *key, const dns_name_t *origin,
|
||||||
dns_ttl_t ttl, isc_mem_t *mctx, void (*report)(const char *, ...)) {
|
dns_ttl_t ttl, isc_mem_t *mctx,
|
||||||
|
void (*report)(const char *, ...) ISC_FORMAT_PRINTF(1, 2)) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
unsigned char buf[DST_KEY_MAXSIZE];
|
unsigned char buf[DST_KEY_MAXSIZE];
|
||||||
char keystr[DST_KEY_FORMATSIZE];
|
char keystr[DST_KEY_FORMATSIZE];
|
||||||
@@ -1902,7 +1903,8 @@ publish_key(dns_diff_t *diff, dns_dnsseckey_t *key, const dns_name_t *origin,
|
|||||||
if (key->prepublish && ttl > key->prepublish) {
|
if (key->prepublish && ttl > key->prepublish) {
|
||||||
isc_stdtime_t now;
|
isc_stdtime_t now;
|
||||||
|
|
||||||
report("Key %s: Delaying activation to match the DNSKEY TTL.",
|
report("Key %s: Delaying activation to match the DNSKEY TTL "
|
||||||
|
"(%u).",
|
||||||
keystr, ttl);
|
keystr, ttl);
|
||||||
|
|
||||||
isc_stdtime_get(&now);
|
isc_stdtime_get(&now);
|
||||||
@@ -1919,7 +1921,7 @@ failure:
|
|||||||
static isc_result_t
|
static isc_result_t
|
||||||
remove_key(dns_diff_t *diff, dns_dnsseckey_t *key, const dns_name_t *origin,
|
remove_key(dns_diff_t *diff, dns_dnsseckey_t *key, const dns_name_t *origin,
|
||||||
dns_ttl_t ttl, isc_mem_t *mctx, const char *reason,
|
dns_ttl_t ttl, isc_mem_t *mctx, const char *reason,
|
||||||
void (*report)(const char *, ...)) {
|
void (*report)(const char *, ...) ISC_FORMAT_PRINTF(1, 2)) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
unsigned char buf[DST_KEY_MAXSIZE];
|
unsigned char buf[DST_KEY_MAXSIZE];
|
||||||
dns_rdata_t dnskey = DNS_RDATA_INIT;
|
dns_rdata_t dnskey = DNS_RDATA_INIT;
|
||||||
@@ -2244,7 +2246,8 @@ isc_result_t
|
|||||||
dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
|
dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
|
||||||
dns_dnsseckeylist_t *removed, const dns_name_t *origin,
|
dns_dnsseckeylist_t *removed, const dns_name_t *origin,
|
||||||
dns_ttl_t hint_ttl, dns_diff_t *diff, isc_mem_t *mctx,
|
dns_ttl_t hint_ttl, dns_diff_t *diff, isc_mem_t *mctx,
|
||||||
void (*report)(const char *, ...)) {
|
void (*report)(const char *, ...)
|
||||||
|
ISC_FORMAT_PRINTF(1, 2)) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
dns_dnsseckey_t *key, *key1, *key2, *next;
|
dns_dnsseckey_t *key, *key1, *key2, *next;
|
||||||
bool found_ttl = false;
|
bool found_ttl = false;
|
||||||
|
@@ -322,7 +322,8 @@ isc_result_t
|
|||||||
dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
|
dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
|
||||||
dns_dnsseckeylist_t *removed, const dns_name_t *origin,
|
dns_dnsseckeylist_t *removed, const dns_name_t *origin,
|
||||||
dns_ttl_t hint_ttl, dns_diff_t *diff, isc_mem_t *mctx,
|
dns_ttl_t hint_ttl, dns_diff_t *diff, isc_mem_t *mctx,
|
||||||
void (*report)(const char *, ...));
|
void (*report)(const char *, ...)
|
||||||
|
ISC_FORMAT_PRINTF(1, 2));
|
||||||
/*%<
|
/*%<
|
||||||
* Update the list of keys in 'keys' with new key information in 'newkeys'.
|
* Update the list of keys in 'keys' with new key information in 'newkeys'.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user