diff options
author | J William Piggott | 2014-10-20 20:48:07 +0200 |
---|---|---|
committer | J William Piggott | 2014-10-20 20:48:07 +0200 |
commit | 66af1c0f449645658fb66ca9f6473fe910eec753 (patch) | |
tree | f05f012ed9cce2d4a4bb044a0cdd1a6e415f9dc0 /sys-utils/hwclock.c | |
parent | hwclock: adjust wording of v2.26 notes (diff) | |
download | kernel-qcow2-util-linux-66af1c0f449645658fb66ca9f6473fe910eec753.tar.gz kernel-qcow2-util-linux-66af1c0f449645658fb66ca9f6473fe910eec753.tar.xz kernel-qcow2-util-linux-66af1c0f449645658fb66ca9f6473fe910eec753.zip |
hwclock: fix superfluous 'if' statement and typo
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'sys-utils/hwclock.c')
-rw-r--r-- | sys-utils/hwclock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 7ebf1deee..b7fbb98e9 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"), |