summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-03-23 23:22:09 +0000
committerdelphij <delphij@FreeBSD.org>2009-03-23 23:22:09 +0000
commit58a5285ab7f65111452430c6753a6cbff4f7c5a9 (patch)
tree2848f434958d8b42a06fc34c506f8e52756a2065
parent6869ba3c1ba37d74619482589dda4c73d6721521 (diff)
downloadFreeBSD-src-58a5285ab7f65111452430c6753a6cbff4f7c5a9.zip
FreeBSD-src-58a5285ab7f65111452430c6753a6cbff4f7c5a9.tar.gz
use more proper format string.
Obtained from: NetBSD via OpenBSD
-rw-r--r--lib/libc/db/btree/bt_debug.c18
-rw-r--r--lib/libc/db/mpool/mpool.c4
2 files changed, 11 insertions, 11 deletions
diff --git a/lib/libc/db/btree/bt_debug.c b/lib/libc/db/btree/bt_debug.c
index 5275bb7..ff5357a 100644
--- a/lib/libc/db/btree/bt_debug.c
+++ b/lib/libc/db/btree/bt_debug.c
@@ -61,7 +61,7 @@ __bt_dump(DB *dbp)
char *sep;
t = dbp->internal;
- (void)fprintf(stderr, "%s: pgsz %d",
+ (void)fprintf(stderr, "%s: pgsz %u",
F_ISSET(t, B_INMEM) ? "memory" : "disk", t->bt_psize);
if (F_ISSET(t, R_RECNO))
(void)fprintf(stderr, " keys %u", t->bt_nrecs);
@@ -157,7 +157,7 @@ __bt_dpage(PAGE *h)
indx_t cur, top;
char *sep;
- (void)fprintf(stderr, " page %d: (", h->pgno);
+ (void)fprintf(stderr, " page %u: (", h->pgno);
#undef X
#define X(flag, name) \
if (h->flags & flag) { \
@@ -174,7 +174,7 @@ __bt_dpage(PAGE *h)
(void)fprintf(stderr, ")\n");
#undef X
- (void)fprintf(stderr, "\tprev %2d next %2d", h->prevpg, h->nextpg);
+ (void)fprintf(stderr, "\tprev %2u next %2u", h->prevpg, h->nextpg);
if (h->flags & P_OVERFLOW)
return;
@@ -292,27 +292,27 @@ __bt_stat(DB *dbp)
(void)mpool_put(t->bt_mp, h, 0);
}
- (void)fprintf(stderr, "%d level%s with %ld keys",
+ (void)fprintf(stderr, "%d level%s with %lu keys",
levels, levels == 1 ? "" : "s", nkeys);
if (F_ISSET(t, R_RECNO))
- (void)fprintf(stderr, " (%d header count)", t->bt_nrecs);
+ (void)fprintf(stderr, " (%u header count)", t->bt_nrecs);
(void)fprintf(stderr,
- "\n%u pages (leaf %d, internal %d, overflow %d)\n",
+ "\n%u pages (leaf %u, internal %u, overflow %u)\n",
pinternal + pleaf + pcont, pleaf, pinternal, pcont);
- (void)fprintf(stderr, "%ld cache hits, %ld cache misses\n",
+ (void)fprintf(stderr, "%lu cache hits, %lu cache misses\n",
bt_cache_hit, bt_cache_miss);
(void)fprintf(stderr, "%lu splits (%lu root splits, %lu sort splits)\n",
bt_split, bt_rootsplit, bt_sortsplit);
pleaf *= t->bt_psize - BTDATAOFF;
if (pleaf)
(void)fprintf(stderr,
- "%.0f%% leaf fill (%ld bytes used, %ld bytes free)\n",
+ "%.0f%% leaf fill (%lu bytes used, %lu bytes free)\n",
((double)(pleaf - lfree) / pleaf) * 100,
pleaf - lfree, lfree);
pinternal *= t->bt_psize - BTDATAOFF;
if (pinternal)
(void)fprintf(stderr,
- "%.0f%% internal fill (%ld bytes used, %ld bytes free\n",
+ "%.0f%% internal fill (%lu bytes used, %lu bytes free\n",
((double)(pinternal - ifree) / pinternal) * 100,
pinternal - ifree, ifree);
if (bt_pfxsaved)
diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c
index caaf47e..779ac89 100644
--- a/lib/libc/db/mpool/mpool.c
+++ b/lib/libc/db/mpool/mpool.c
@@ -406,9 +406,9 @@ mpool_stat(MPOOL *mp)
int cnt;
char *sep;
- (void)fprintf(stderr, "%u pages in the file\n", mp->npages);
+ (void)fprintf(stderr, "%lu pages in the file\n", mp->npages);
(void)fprintf(stderr,
- "page size %lu, cacheing %u pages of %u page max cache\n",
+ "page size %lu, cacheing %lu pages of %lu page max cache\n",
mp->pagesize, mp->curcache, mp->maxcache);
(void)fprintf(stderr, "%lu page puts, %lu page gets, %lu page new\n",
mp->pageput, mp->pageget, mp->pagenew);
OpenPOWER on IntegriCloud