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/hwclock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys-utils/hwclock.c') diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 5f4c014fc..9512f696e 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1259,7 +1259,7 @@ int main(int argc, char **argv) #endif bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - atexit(close_stdout); + close_stdout_atexit(); while ((c = getopt_long(argc, argv, "hvVDd:alrsuwf:", longopts, NULL)) != -1) { @@ -1359,9 +1359,9 @@ int main(int argc, char **argv) ctl.rtc_dev_name = optarg; /* --rtc */ break; #endif + case 'V': /* --version */ - out_version(); - return 0; + print_version(EXIT_SUCCESS); case 'h': /* --help */ usage(); default: -- cgit v1.2.3-55-g7522