]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: clean usage, remove redundat code
authorKarel Zak <kzak@redhat.com>
Thu, 2 Feb 2012 13:23:49 +0000 (14:23 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 2 Feb 2012 13:23:49 +0000 (14:23 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
hwclock/hwclock.c

index e9db43cad5f212144061378b7374391fc73bf876..1a430ada29c947fd9b58516ceead9451cd90d9b8 100644 (file)
@@ -1416,14 +1416,13 @@ static void usage(const char *fmt, ...)
                 "\n"), usageto);
 #endif
 
-       fflush(usageto);
        if (fmt) {
-               usageto = stderr;
                va_start(ap, fmt);
-               vfprintf(stderr, fmt, ap);
+               vfprintf(usageto, fmt, ap);
                va_end(ap);
        }
 
+       fflush(usageto);
        hwclock_exit(fmt ? EX_USAGE : EX_OK);
 }