From 1030c325c05b79f70a199464b05c72d3d383a9bc Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 16 Jul 2016 12:50:53 +0100 Subject: hwclock: remove FLOOR macro in favour of floor(3) Reviewed-by: J William Piggott Signed-off-by: Sami Kerola --- sys-utils/hwclock.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sys-utils/hwclock.c') diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 1d193a5da..3cc425f9d 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -92,8 +92,6 @@ static int hwaudit_on; /* The struct that holds our hardware access routines */ struct clock_ops *ur; -#define FLOOR(arg) ((arg >= 0 ? (int) arg : ((int) arg) - 1)); - /* Maximal clock adjustment in seconds per day. (adjtime() glibc call has 2145 seconds limit on i386, so it is good enough for us as well, 43219 is a maximal safe value preventing exact_adjustment overflow.) */ @@ -1068,7 +1066,7 @@ calculate_adjustment(const double factor, exact_adjustment = ((double)(systime - last_time)) * factor / (24 * 60 * 60) + not_adjusted; - tdrift_p->tv_sec = FLOOR(exact_adjustment); + tdrift_p->tv_sec = (time_t) floor(exact_adjustment); tdrift_p->tv_usec = (exact_adjustment - (double)tdrift_p->tv_sec) * 1E6; if (debug) { -- cgit v1.2.3-55-g7522