X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=test%2Ftest_x509.c;h=52a9e2c4ef2bfa7447a05f9b1c902ee275a19eb2;hp=a591b46e992a0671bc44aea01c1452a6d58dc988;hb=e8ccee8bcdae80cdf74c6d7327f1c7572589fae3;hpb=3210f38e0491b39aec1ef419cb4114e9483089fb diff --git a/test/test_x509.c b/test/test_x509.c index a591b46..52a9e2c 100644 --- a/test/test_x509.c +++ b/test/test_x509.c @@ -258,6 +258,9 @@ HT_expand(HT *ht) n = ht->num_buckets; n2 = n << 1; new_buckets = xmalloc(n2 * sizeof *new_buckets); + for (u = 0; u < n2; u ++) { + new_buckets[u] = NULL; + } for (u = 0; u < n; u ++) { ht_elt *e, *f; @@ -509,7 +512,7 @@ static int string_to_time(const char *s, uint32_t *days, uint32_t *seconds) { int year, month, day, hour, minute, second; - int day_of_year, leaps; + int day_of_year, leaps, i; if (parse_dec(s, 4, &year) < 0) { return -1; @@ -568,7 +571,7 @@ string_to_time(const char *s, uint32_t *days, uint32_t *seconds) return -1; } day_of_year = 0; - for (int i = 1; i < month; i ++) { + for (i = 1; i < month; i ++) { day_of_year += month_length(year, i); } if (day < 1 || day > month_length(year, month)) {