Cleanup/refactoring pass on hwclock.
authorRob Landley <rob@landley.net>
Mon, 9 Feb 2015 22:34:24 +0000 (16:34 -0600)
committerRob Landley <rob@landley.net>
Mon, 9 Feb 2015 22:34:24 +0000 (16:34 -0600)
commitc277f347bba2417106b32212d9d40aceb4a88fb5
treeba7228ee308b980970b8c3419af5c9690095e3b7
parent452dcd5f7d5374411da86777de9fe94f5a88f709
Cleanup/refactoring pass on hwclock.

Inline open_wall_clock_rtc() into rtc_open(), factor out xtzset(),
inline set_sysclock_from_hwclock(), set_hwclock_from_sysclock(),
and set_sysclock_timezone().

/etc/adjtime is short enough we don't need to bother with a break.

The final "else" case in main() should always trigger because >0 in optstr
says "at most zero arguments", so the || at the end is always true, so
take the test off.
lib/lib.h
lib/xwrap.c
toys/pending/hwclock.c