]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
chmem: don't use scanf format for printf
authorRuediger Meier <ruediger.meier@ga-group.nl>
Fri, 7 Apr 2017 11:35:59 +0000 (13:35 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 10 Apr 2017 13:41:21 +0000 (15:41 +0200)
The compiler had not complained here because both macros are
probably the same.

But gettext issued a funny warning:
sys-utils/chmem.c:67: warning: Although being used in a format string position, the msgid is not a valid C format string. Reason: The string ends in the middle of a directive.

CC: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
sys-utils/chmem.c

index ad394ac4c4f21198977e3dee1c59823769195d17..44733bf769fee31000676a1cf2bf0251fb578829 100644 (file)
@@ -64,7 +64,7 @@ static void idxtostr(struct chmem_desc *desc, uint64_t idx, char *buf, size_t bu
        start = idx * desc->block_size;
        end = start + desc->block_size - 1;
        snprintf(buf, bufsz,
-                _("Memory Block %"SCNu64" (0x%016"PRIx64"-0x%016"PRIx64")"),
+                _("Memory Block %"PRIu64" (0x%016"PRIx64"-0x%016"PRIx64")"),
                 idx, start, end);
 }