summaryrefslogtreecommitdiffstats
path: root/hwclock/hwclock.c
diff options
context:
space:
mode:
authorKarel Zak2012-02-02 14:23:49 +0100
committerKarel Zak2012-02-02 14:23:49 +0100
commit4f899788689f07cd79dc0bf21f772313d71cc44e (patch)
treee941b3c1e734cc30f2125dd2b2deb7d419c842cb /hwclock/hwclock.c
parentlogin: (and chsh) make pw_shell usage more robust (diff)
downloadkernel-qcow2-util-linux-4f899788689f07cd79dc0bf21f772313d71cc44e.tar.gz
kernel-qcow2-util-linux-4f899788689f07cd79dc0bf21f772313d71cc44e.tar.xz
kernel-qcow2-util-linux-4f899788689f07cd79dc0bf21f772313d71cc44e.zip
hwclock: clean usage, remove redundat code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'hwclock/hwclock.c')
-rw-r--r--hwclock/hwclock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c
index e9db43cad..1a430ada2 100644
--- a/hwclock/hwclock.c
+++ b/hwclock/hwclock.c
@@ -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);
}