From c6ea9ef6cbe3a7ec38f550b18239fc1b27eb5e41 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 17 Jul 2016 11:30:40 +0100 Subject: hwclock: remove dead code and other minor fixes Use #ifdef rather than #if to avoid undefined preprocessor identifier warning. Remove dead code. The #if 0 ensured the code has not been used for long time, which is good because the linux/mc146818rtc.h is not been part of user-api for long time. Value of the adjtime_p->last_calib_time is checked if it has value of zero, so testing none-zero bit later is necessarily true, and therefore does not need to be checked. And at the and remove unnecessary boolean variable. Signed-off-by: Sami Kerola --- sys-utils/hwclock-rtc.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'sys-utils/hwclock-rtc.c') diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c index 8dd47092f..b974cc2aa 100644 --- a/sys-utils/hwclock-rtc.c +++ b/sys-utils/hwclock-rtc.c @@ -53,18 +53,6 @@ struct sparc_rtc_time #define RTCGET _IOR('p', 20, struct sparc_rtc_time) #define RTCSET _IOW('p', 21, struct sparc_rtc_time) -/* non-sparc stuff */ -#if 0 -# include -/* - * Check if the /dev/rtc interface is available in this version of the - * system headers. 131072 is linux 2.0.0. - */ -# if LINUX_VERSION_CODE >= 131072 -# include -# endif -#endif - /* * struct rtc_time is present since 1.3.99. * Earlier (since 1.3.89), a struct tm was used. -- cgit v1.2.3-55-g7522