Skip to content

Commit 7e4be92

Browse files
authored
zdb: fix printf format in dump_zap()
When compiling zdb.c on 32-bit platforms, a format conversion error is reported for a printf() in dump_zap(). Change %l to macro %" PRIu64 " to match the platform size of a 64-bit unsigned integer. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Martin Matuska <[email protected]> Closes #16635
1 parent 7bf5255 commit 7e4be92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/zdb/zdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size)
11311131
!!(zap_getflags(zc.zc_zap) & ZAP_FLAG_UINT64_KEY);
11321132

11331133
if (key64)
1134-
(void) printf("\t\t0x%010lx = ",
1134+
(void) printf("\t\t0x%010" PRIu64 "x = ",
11351135
*(uint64_t *)attrp->za_name);
11361136
else
11371137
(void) printf("\t\t%s = ", attrp->za_name);

0 commit comments

Comments
 (0)