diff options
author | delphij <delphij@FreeBSD.org> | 2009-03-23 23:22:09 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-03-23 23:22:09 +0000 |
commit | 58a5285ab7f65111452430c6753a6cbff4f7c5a9 (patch) | |
tree | 2848f434958d8b42a06fc34c506f8e52756a2065 /lib/libc/db/btree | |
parent | 6869ba3c1ba37d74619482589dda4c73d6721521 (diff) | |
download | FreeBSD-src-58a5285ab7f65111452430c6753a6cbff4f7c5a9.zip FreeBSD-src-58a5285ab7f65111452430c6753a6cbff4f7c5a9.tar.gz |
use more proper format string.
Obtained from: NetBSD via OpenBSD
Diffstat (limited to 'lib/libc/db/btree')
-rw-r--r-- | lib/libc/db/btree/bt_debug.c | 18 |
1 files changed, 9 insertions, 9 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) |