From 2c308875a7fa1aaa44892c368f6b37bcfcb8879a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 16 Apr 2019 15:14:13 +0200 Subject: misc: consolidate version printing and close_stdout() Signed-off-by: Karel Zak --- sys-utils/ipcrm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys-utils/ipcrm.c') diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c index a9f2d1b9a..5a27b7d20 100644 --- a/sys-utils/ipcrm.c +++ b/sys-utils/ipcrm.c @@ -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); } -- cgit v1.2.3-55-g7522