mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <isc/json.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
@@ -1401,47 +1403,47 @@ dns_cache_dumpstats(dns_cache_t *cache, FILE *fp) {
|
||||
getcounters(cache->stats, isc_statsformat_file,
|
||||
dns_cachestatscounter_max, indices, values);
|
||||
|
||||
fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
values[dns_cachestatscounter_hits],
|
||||
"cache hits");
|
||||
fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
values[dns_cachestatscounter_misses],
|
||||
"cache misses");
|
||||
fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
values[dns_cachestatscounter_queryhits],
|
||||
"cache hits (from query)");
|
||||
fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
values[dns_cachestatscounter_querymisses],
|
||||
"cache misses (from query)");
|
||||
fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
values[dns_cachestatscounter_deletelru],
|
||||
"cache records deleted due to memory exhaustion");
|
||||
fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
values[dns_cachestatscounter_deletettl],
|
||||
"cache records deleted due to TTL expiration");
|
||||
fprintf(fp, "%20u %s\n", dns_db_nodecount(cache->db),
|
||||
"cache database nodes");
|
||||
fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
(isc_uint64_t) dns_db_hashsize(cache->db),
|
||||
"cache database hash buckets");
|
||||
|
||||
fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
(isc_uint64_t) isc_mem_total(cache->mctx),
|
||||
"cache tree memory total");
|
||||
fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
(isc_uint64_t) isc_mem_inuse(cache->mctx),
|
||||
"cache tree memory in use");
|
||||
fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
(isc_uint64_t) isc_mem_maxinuse(cache->mctx),
|
||||
"cache tree highest memory in use");
|
||||
|
||||
fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
(isc_uint64_t) isc_mem_total(cache->hmctx),
|
||||
"cache heap memory total");
|
||||
fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
(isc_uint64_t) isc_mem_inuse(cache->hmctx),
|
||||
"cache heap memory in use");
|
||||
fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
|
||||
fprintf(fp, "%20" PRIu64 " %s\n",
|
||||
(isc_uint64_t) isc_mem_maxinuse(cache->hmctx),
|
||||
"cache heap highest memory in use");
|
||||
}
|
||||
@@ -1456,7 +1458,7 @@ renderstat(const char *name, isc_uint64_t value, xmlTextWriterPtr writer) {
|
||||
TRY0(xmlTextWriterWriteAttribute(writer,
|
||||
ISC_XMLCHAR "name", ISC_XMLCHAR name));
|
||||
TRY0(xmlTextWriterWriteFormatString(writer,
|
||||
"%" ISC_PRINT_QUADFORMAT "u",
|
||||
"%" PRIu64 "",
|
||||
value));
|
||||
TRY0(xmlTextWriterEndElement(writer)); /* counter */
|
||||
|
||||
|
Reference in New Issue
Block a user