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 --- text-utils/rev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'text-utils/rev.c') diff --git a/text-utils/rev.c b/text-utils/rev.c index 13a41f633..57624e6fb 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -113,7 +113,7 @@ int main(int argc, char *argv[]) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - atexit(close_stdout); + close_stdout_atexit(); signal(SIGINT, sig_handler); signal(SIGTERM, sig_handler); @@ -121,8 +121,7 @@ int main(int argc, char *argv[]) while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1) switch(ch) { case 'V': - printf(UTIL_LINUX_VERSION); - exit(EXIT_SUCCESS); + print_version(EXIT_SUCCESS); case 'h': usage(); default: -- cgit v1.2.3-55-g7522