]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - login-utils/utmpdump.c
misc: consolidate version printing and close_stdout()
[thirdparty/util-linux.git] / login-utils / utmpdump.c
index 5cc87834aef32e0897859cdda364363986891bd4..f1a3607dc0f240c9ea11c6ad8561b7404e0822a9 100644 (file)
@@ -334,7 +334,7 @@ int main(int argc, char **argv)
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
-       atexit(close_stdout);
+       close_stdout_atexit();
 
        while ((c = getopt_long(argc, argv, "fro:hV", longopts, NULL)) != -1) {
                switch (c) {
@@ -355,10 +355,8 @@ int main(int argc, char **argv)
 
                case 'h':
                        usage();
-                       break;
                case 'V':
-                       printf(UTIL_LINUX_VERSION);
-                       return EXIT_SUCCESS;
+                       print_version(EXIT_SUCCESS);
                default:
                        errtryhelp(EXIT_FAILURE);
                }