upgrade-apply: Fix print format for uint64_t 13/312513/1 accepted/tizen/unified/20240611.162844 accepted/tizen/unified/20240612.160703 accepted/tizen/unified/x/20240612.025935
authorSangYoun Kwak <sy.kwak@samsung.com>
Tue, 11 Jun 2024 04:28:02 +0000 (13:28 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Tue, 11 Jun 2024 04:29:15 +0000 (13:29 +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: I2f62f30b5b3ae44eb5feb38d07f37f2050814bb0
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
src/upgrade-apply/main.c

index 343e4bce1f89dd12f158a12e635e9b83d7ffec73..0e5cb937477f8c05322d4c1d27eab71a83b235af 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include <libtar.h>
 #include <zlib.h>
@@ -446,7 +447,7 @@ int get_block_count_from_progress_file(const char* progress_info_file, const cha
                                        ret = -1;
                                } else {
                                        *block_count = (uint64_t) atoi(read_word);
-                                       fprintf(stderr, "Block count for %s: %ld\n", archive_file, *block_count);
+                                       fprintf(stderr, "Block count for %s: %"PRIu64"\n", archive_file, *block_count);
                                        ret = 0;
                                }