]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/commonio.c: Use uintmax_t to print nlink_t
authorAlejandro Colomar <alx@kernel.org>
Sat, 2 Sep 2023 12:29:07 +0000 (14:29 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Mon, 4 Dec 2023 10:45:09 +0000 (11:45 +0100)
See uintmax_t(3type).

While at it, remove the useless cast to (void).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/commonio.c

index df2986aaa7c1adf55df5cdff19567d40fe79b6de..af207506289967c2c296647c8a5103154640b4f6 100644 (file)
@@ -110,9 +110,9 @@ static int check_link_count (const char *file, bool log)
 
        if (sb.st_nlink != 2) {
                if (log) {
-                       (void) fprintf (shadow_logfd,
-                                       "%s: %s: lock file already used (nlink: %u)\n",
-                                       shadow_progname, file, sb.st_nlink);
+                       fprintf(shadow_logfd,
+                               "%s: %s: lock file already used (nlink: %ju)\n",
+                               shadow_progname, file, (uintmax_t) sb.st_nlink);
                }
                return 0;
        }