From: Willem Toorop Date: Wed, 11 Jan 2012 12:54:10 +0000 (+0000) Subject: A trailing null is not necesarry when using strftime. X-Git-Tag: release-1.6.12~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f97496772770b51f60a82843f1197b8618ffbd5;p=thirdparty%2Fldns.git A trailing null is not necesarry when using strftime. I'm using to many scripting languages... --- diff --git a/rr_functions.c b/rr_functions.c index be8f6868..b4847d62 100644 --- a/rr_functions.c +++ b/rr_functions.c @@ -363,7 +363,7 @@ uint32_t ldns_soa_serial_datecounter(uint32_t s, void *data) uint32_t new_s; time_t t = data ? (time_t) (intptr_t) data : ldns_time(NULL); - (void) strftime(s_str, 11, "%Y%m%d00\000", localtime_r(&t, &tm)); + (void) strftime(s_str, 11, "%Y%m%d00", localtime_r(&t, &tm)); new_s = (uint32_t) atoi(s_str); return new_s > s ? new_s : s+1; }