From: J William Piggott Date: Mon, 20 Oct 2014 18:48:07 +0000 (-0400) Subject: hwclock: fix superfluous 'if' statement and typo X-Git-Tag: v2.26-rc1~290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66af1c0f449645658fb66ca9f6473fe910eec753;p=thirdparty%2Futil-linux.git hwclock: fix superfluous 'if' statement and typo Signed-off-by: J William Piggott --- diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 7ebf1deeeb..b7fbb98e9b 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1357,9 +1357,6 @@ manipulate_clock(const bool show, const bool adjust, const bool noadjfile, hclocktime.tv_sec, &tdrift); if (!show && !predict) hclocktime = time_inc(tdrift, hclocktime.tv_sec); - if (predict) - hclocktime = time_inc(hclocktime, (double) - -(tdrift.tv_sec + tdrift.tv_sec / 1E6)); if (show || get) { display_time(hclock_valid, time_inc(hclocktime, -time_diff @@ -1410,6 +1407,8 @@ manipulate_clock(const bool show, const bool adjust, const bool noadjfile, return rc; } } else if (predict) { + hclocktime = time_inc(hclocktime, (double) + -(tdrift.tv_sec + tdrift.tv_usec / 1E6)); if (debug) { printf(_ ("At %ld seconds after 1969, RTC is predicted to read %ld seconds after 1969.\n"),