summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock.c
diff options
context:
space:
mode:
authorSami Kerola2016-07-16 14:23:28 +0200
committerSami Kerola2017-02-05 00:39:37 +0100
commit183a2715b115d889fac6b50677c6951f8b277cb5 (patch)
treea3369b122b122a6f0a0f2412bae501ce711e2292 /sys-utils/hwclock.c
parenthwclock: remove hwclock_exit() indirection (diff)
downloadkernel-qcow2-util-linux-183a2715b115d889fac6b50677c6951f8b277cb5.tar.gz
kernel-qcow2-util-linux-183a2715b115d889fac6b50677c6951f8b277cb5.tar.xz
kernel-qcow2-util-linux-183a2715b115d889fac6b50677c6951f8b277cb5.zip
hwclock: do not hardcode date command magic string twice
Variable 'magic' already contains string 'seconds-into-epoch'. Reviewed-by: J William Piggott <elseifthen@gmx.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/hwclock.c')
-rw-r--r--sys-utils/hwclock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 10cb02a50..db1912a60 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -717,8 +717,8 @@ static int interpret_date_string(const char *date_opt, time_t * const time_p)
return 12;
}
- sprintf(date_command, "date --date=\"%s\" +seconds-into-epoch=%%s",
- date_opt);
+ sprintf(date_command, "date --date=\"%s\" +%s%%s",
+ date_opt, magic);
if (debug)
printf(_("Issuing date command: %s\n"), date_command);