]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: pacify another gcc -Wzero-as-null-pointer-constant warning
authorCollin Funk <collin.funk1@gmail.com>
Sat, 17 Jan 2026 06:56:15 +0000 (22:56 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Sat, 17 Jan 2026 06:56:15 +0000 (22:56 -0800)
* src/uptime.c (print_uptime): Add a timezone_t cast to zero. Don't use
nullptr since timezone_t is not a standardized and may be defined to
something other than a pointer.

src/uptime.c

index 4e07f1cb829531d8df7155ecc1bf53fc75e6ec86..37d3206f92e1a6ee4de231dafb34b1781592858e 100644 (file)
@@ -66,7 +66,7 @@ print_uptime (idx_t n, STRUCT_UTMP const *utmp_buf)
      previous versions of coreutils don't. */
   if (tmn)
     /* TRANSLATORS: This prints the current clock time. */
-    fprintftime (stdout, _(" %H:%M:%S  "), tmn, 0, 0);
+    fprintftime (stdout, _(" %H:%M:%S  "), tmn, (timezone_t) 0, 0);
   else
     {
       printf (_(" ??:????  "));