]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - sys-utils/ipcrm.c
misc: consolidate version printing and close_stdout()
[thirdparty/util-linux.git] / sys-utils / ipcrm.c
index a9f2d1b9ada28723a7d0f61d3034eddd862ba923..5a27b7d2099e7654689983f31d82f5d24c48414a 100644 (file)
@@ -328,7 +328,7 @@ int main(int argc, char **argv)
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
-       atexit(close_stdout);
+       close_stdout_atexit();
 
        /* check to see if the command is being invoked in the old way if so
         * then remove argument list */
@@ -400,11 +400,11 @@ int main(int argc, char **argv)
                case 'v':
                        verbose = 1;
                        break;
+
                case 'h':
                        usage();
                case 'V':
-                       printf(UTIL_LINUX_VERSION);
-                       return EXIT_SUCCESS;
+                       print_version(EXIT_SUCCESS);
                default:
                        errtryhelp(EXIT_FAILURE);
                }