]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
strutils: fix printf formats
authorThomas Weißschuh <thomas@t-8ch.de>
Sun, 12 Apr 2026 06:08:37 +0000 (08:08 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sun, 12 Apr 2026 07:03:31 +0000 (09:03 +0200)
Use the correct printf format placeholders for uint64_t and int64_t.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
lib/strutils.c

index 0fce3c7c6560c3971250576e1548e3415af4394e..9b2aec94e1748a9768e5b015cd2cb33951d83152 100644 (file)
@@ -1513,10 +1513,10 @@ int main(int argc, char *argv[])
                return test_strutils_normalize(argc - 1, argv + 1);
 
        } else if (argc == 3 && strcmp(argv[1], "--strtos64") == 0) {
-               printf("'%s'-->%jd\n", argv[2], strtos64_or_err(argv[2], "strtos64 failed"));
+               printf("'%s'-->%"PRId64"\n", argv[2], strtos64_or_err(argv[2], "strtos64 failed"));
                return EXIT_SUCCESS;
        } else if (argc == 3 && strcmp(argv[1], "--strtou64") == 0) {
-               printf("'%s'-->%ju\n", argv[2], strtou64_or_err(argv[2], "strtou64 failed"));
+               printf("'%s'-->%"PRIu64"\n", argv[2], strtou64_or_err(argv[2], "strtou64 failed"));
                return EXIT_SUCCESS;
        } else if (argc == 3 && strcmp(argv[1], "--strtos32") == 0) {
                printf("'%s'-->%d\n", argv[2], strtos32_or_err(argv[2], "strtos32 failed"));