From 6c7d09c8e7a8db287b68e04f6effaea492775d23 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 30 Mar 2012 13:14:31 +0000 Subject: [PATCH] Unchanged serial numbers have not incremented! --- rr_functions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rr_functions.c b/rr_functions.c index 13bf6a7b..b03751b0 100644 --- a/rr_functions.c +++ b/rr_functions.c @@ -365,14 +365,14 @@ uint32_t ldns_soa_serial_datecounter(uint32_t s, void *data) (void) strftime(s_str, 11, "%Y%m%d00", localtime_r(&t, &tm)); new_s = (int32_t) atoi(s_str); - return new_s - ((int32_t) s) < 0 ? s+1 : ((uint32_t) new_s); + return new_s - ((int32_t) s) <= 0 ? s+1 : ((uint32_t) new_s); } uint32_t ldns_soa_serial_unixtime(uint32_t s, void *data) { int32_t new_s = data ? (int32_t) (intptr_t) data : (int32_t) ldns_time(NULL); - return new_s - ((int32_t) s) < 0 ? s+1 : ((uint32_t) new_s); + return new_s - ((int32_t) s) <= 0 ? s+1 : ((uint32_t) new_s); } void -- 2.47.3