]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
A trailing null is not necesarry when using strftime.
authorWillem Toorop <willem@NLnetLabs.nl>
Wed, 11 Jan 2012 12:54:10 +0000 (12:54 +0000)
committerWillem Toorop <willem@NLnetLabs.nl>
Wed, 11 Jan 2012 12:54:10 +0000 (12:54 +0000)
I'm using to many scripting languages...

rr_functions.c

index be8f6868b80855ceeae258a499bc61c0f2b5cda6..b4847d62c640f02b242fe9881578e1adca07048b 100644 (file)
@@ -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;
 }