]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libuuid: fix uint64_t printf and scanf format
authorKarel Zak <kzak@redhat.com>
Fri, 12 Jan 2024 09:52:40 +0000 (10:52 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 12 Jan 2024 09:52:40 +0000 (10:52 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libuuid/src/gen_uuid.c

index 79e5e285c5b1fd5c2b6f077ac0ba83444de347fa..59e8c23f01a8afe8fcbe4c0e2f9eb3f2189d04a8 100644 (file)
@@ -405,7 +405,7 @@ static int get_clock_cont(uint32_t *clock_high,
 
                if (st.st_size) {
                        rewind(state_f);
-                       if (fscanf(state_f, "cont: %lu\n", &last_clock_reg) != 1)
+                       if (fscanf(state_f, "cont: %"SCNu64"\n", &last_clock_reg) != 1)
                                goto error;
                } else
                        last_clock_reg = clock_reg;
@@ -431,7 +431,7 @@ static int get_clock_cont(uint32_t *clock_high,
                int l;
 
                rewind(state_f);
-               l = fprintf(state_f, "cont: %020lu                   \n", cl);
+               l = fprintf(state_f, "cont: %020"PRIu64"                   \n", cl);
                if (l < 30 || fflush(state_f))
                        goto error;
                saved_clock_reg = cl;