]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - login-utils/vipw.c
misc: consolidate version printing and close_stdout()
[thirdparty/util-linux.git] / login-utils / vipw.c
index 2502fcb4eab540814ce6c5d3dd9f8f4102d7d01c..2b35036e618e5de152043f2175f20e5d9cad9b6c 100644 (file)
@@ -325,7 +325,7 @@ int main(int argc, char *argv[])
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
-       atexit(close_stdout);
+       close_stdout_atexit();
 
        if (!strcmp(program_invocation_short_name, "vigr")) {
                program = VIGR;
@@ -338,8 +338,7 @@ int main(int argc, char *argv[])
        while ((c = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1)
                switch (c) {
                case 'V':
-                       printf(UTIL_LINUX_VERSION);
-                       return EXIT_SUCCESS;
+                       print_version(EXIT_SUCCESS);
                case 'h':
                        usage();
                default: