From: Sami Kerola Date: Sat, 16 Jul 2016 12:23:28 +0000 (+0100) Subject: hwclock: do not hardcode date command magic string twice X-Git-Tag: v2.30-rc1~267^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=183a2715b115d889fac6b50677c6951f8b277cb5;p=thirdparty%2Futil-linux.git hwclock: do not hardcode date command magic string twice Variable 'magic' already contains string 'seconds-into-epoch'. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola --- diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 10cb02a509..db1912a607 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);