From 7a6c979299ce5e0bea45ba7f2fe92443ac5a0735 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 24 Aug 2009 15:09:29 -0700 Subject: [PATCH] Use existing time_t rounding function, don't invent my own. Jeremy. --- source3/lib/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/time.c b/source3/lib/time.c index c80b59a662f..a9f7899c7bd 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -474,7 +474,7 @@ int timespec_compare(const struct timespec *ts1, const struct timespec *ts2) void round_timespec(struct timespec *ts) { - ts->tv_sec += ts->tv_nsec >= 500000000 ? 1 : 0; + ts->tv_sec = convert_timespec_to_time_t(*ts); ts->tv_nsec = 0; }