]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - sys-utils/ipcmk.c
misc: consolidate version printing and close_stdout()
[thirdparty/util-linux.git] / sys-utils / ipcmk.c
index df836525a1a743b417a57df4b6beb110168e9990..8aadffbbbacd69b3a8378eb24a80f202b0e0b2dd 100644 (file)
@@ -102,7 +102,7 @@ int main(int argc, char **argv)
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
-       atexit(close_stdout);
+       close_stdout_atexit();
 
        while((opt = getopt_long(argc, argv, "hM:QS:p:Vh", longopts, NULL)) != -1) {
                switch(opt) {
@@ -120,12 +120,11 @@ int main(int argc, char **argv)
                case 'p':
                        permission = strtoul(optarg, NULL, 8);
                        break;
+
                case 'h':
                        usage();
-                       break;
                case 'V':
-                       printf(UTIL_LINUX_VERSION);
-                       return EXIT_SUCCESS;
+                       print_version(EXIT_SUCCESS);
                default:
                        errtryhelp(EXIT_FAILURE);
                }