summaryrefslogtreecommitdiff
path: root/nand-utils/nandflipbits.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-08-24 10:28:42 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-08-24 10:30:28 +0200
commitdfaf6e455621077f78d301f95de2e5dbab0f8512 (patch)
tree680d049fdc1ee5c2ba95146941a8e0340bc2a8c4 /nand-utils/nandflipbits.c
parentdfae7f60dfb577031175848b0dbf5d12ff1ebbc3 (diff)
Fix printf format specifiers for 64 bit integer types
In nandflipbits, nandtest and ubiscan, uint64_t integers are printed to stdout using "%llu" as a format specifier, but on platforms like x86_64, uint64_t is actually typedef'd as `unsigned long` only. For compatibillity across platforms, simply use the C99 printfs macros instead. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'nand-utils/nandflipbits.c')
-rw-r--r--nand-utils/nandflipbits.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nand-utils/nandflipbits.c b/nand-utils/nandflipbits.c
index cd66d0b..7066408 100644
--- a/nand-utils/nandflipbits.c
+++ b/nand-utils/nandflipbits.c
@@ -203,7 +203,8 @@ int main(int argc, char **argv)
int page;
if (bits_to_flip[i].offset >= mtdlen) {
- fprintf(stderr, "Invalid byte offset %lld (max %lld)\n",
+ fprintf(stderr, "Invalid byte offset %" PRId64
+ " (max %" PRId64 ")\n",
bits_to_flip[i].offset, mtdlen);
ret = EXIT_FAILURE;
goto free_buf;