]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
uptime: simplify -fsanitize=leak pacification
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Jan 2022 16:42:07 +0000 (08:42 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Jan 2022 20:07:39 +0000 (12:07 -0800)
* src/uptime.c (uptime): Exit here ...
(main): ... instead of here.

src/uptime.c

index b620885f784c554234f65049da63e93e08868060..f1cb84a6bc06b5c1db9fc4964aed1a527a943cc7 100644 (file)
@@ -186,7 +186,7 @@ uptime (char const *filename, int options)
 
   print_uptime (n_users, utmp_buf);
 
-  IF_LINT (free (utmp_buf));
+  exit (EXIT_SUCCESS);
 }
 
 void
@@ -252,6 +252,4 @@ main (int argc, char **argv)
       error (0, 0, _("extra operand %s"), quote (argv[optind + 1]));
       usage (EXIT_FAILURE);
     }
-
-  return EXIT_SUCCESS;
 }