ss_bsdiff: Fix printf format for uint64_t 46/312546/1
authorSangYoun Kwak <sy.kwak@samsung.com>
Tue, 11 Jun 2024 08:41:02 +0000 (17:41 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Tue, 11 Jun 2024 08:41:34 +0000 (17:41 +0900)
The printf format for uint64_t was "%ld", so it is fixed with "PRIu64",
which can be used for uint64_t portably.

Change-Id: I78643cf92e45eeb3ca87b01e1e3be682d63e2391
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
bsdiff/ss_bsdiff.c

index 3dffcf7..e1f68c5 100644 (file)
@@ -257,7 +257,7 @@ int write_block_count_to_file(const char *block_count_file, uint64_t block_count
 
        const size_t buf_size = 20;
        char buf[buf_size];
-       snprintf(buf, buf_size, "%ld\n", block_count);
+       snprintf(buf, buf_size, "%"PRIu64"\n", block_count);
 
        size_t str_len = strlen(buf);