From 8a6f41d86ac80fd1397ffee65bed5131129a84e2 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 4 Dec 2012 14:59:56 +1100 Subject: [PATCH 1/2] 3430. [bug] win32: isc_time_formatISO8601 was missing the 'T' between the date and time. [RT #32044] --- CHANGES | 3 +++ lib/isc/win32/time.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index ea87ecbe07..2245e8ce94 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3430. [bug] win32: isc_time_formatISO8601 was missing the + 'T' between the date and time. [RT #32044] + 3429. [bug] dns_zone_getserial2 could a return success without returning a valid serial. [RT #32007] diff --git a/lib/isc/win32/time.c b/lib/isc/win32/time.c index fe303f3732..8aaf6bc65f 100644 --- a/lib/isc/win32/time.c +++ b/lib/isc/win32/time.c @@ -313,7 +313,7 @@ isc_time_formatISO8601(const isc_time_t *t, char *buf, unsigned int len) { GetTimeFormat(LOCALE_NEUTRAL, TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT, &st, "hh':'mm':'ss", TimeBuf, 50); - snprintf(buf, len, "%s%sZ", DateBuf, TimeBuf); + snprintf(buf, len, "%sT%sZ", DateBuf, TimeBuf); } else { buf[0] = 0; } From 377e7f19ef4789144bd1d69421360d5aa7e04b83 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 5 Dec 2012 11:43:07 +1100 Subject: [PATCH 2/2] silence clang --analyser false positive --- bin/tests/names/t_names.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/tests/names/t_names.c b/bin/tests/names/t_names.c index 5271d8929f..a0b3f89de1 100644 --- a/bin/tests/names/t_names.c +++ b/bin/tests/names/t_names.c @@ -2194,7 +2194,8 @@ static const char *a52 = static int test_dns_name_towire(char *testname, unsigned int dc_method, char *exp_data, - int exp_data_len, isc_result_t exp_result, size_t buflen) + size_t exp_data_len, isc_result_t exp_result, + size_t buflen) { int result; int val; @@ -2263,6 +2264,7 @@ t_dns_name_towire_x(const char *testfile, size_t buflen) { int result; unsigned int dc_method; isc_result_t exp_result; + size_t exp_data_len; char *p; FILE *fp; @@ -2292,11 +2294,12 @@ t_dns_name_towire_x(const char *testfile, size_t buflen) { dc_method = t_dc_method_fromtext(Tokens[3]); exp_result = t_dns_result_fromtext(Tokens[4]); + exp_data_len = strtoul(Tokens[3], NULL, 10); result = test_dns_name_towire(Tokens[0], dc_method, Tokens[2], - atoi(Tokens[3]), + exp_data_len, exp_result, buflen); } else {