@@ -1866,7 +1866,7 @@ gmt_time_string(char *buf, size_t buf_len, time_t *t)
{
struct tm *tm;
- tm = gmtime(t);
+ tm = ((t != NULL) ? gmtime(t) : NULL);
if (tm != NULL) {
strftime(buf, buf_len, "%a, %d %b %Y %H:%M:%S GMT", tm);
} else {
@@ -700,7 +700,7 @@ make_private_suite(void)
/* Used to debug test cases without using the check framework */
void
-xmain(void)
+main(void)
test_alloc_vprintf(0);
test_mg_vsnprintf(0);
@@ -447,8 +447,8 @@ START_TEST(test_mg_get_response_code_text)
for (j = 0; j < len; j++) {
if (resp[j] == ' ') {
/* space is valid */
- } else if (resp[j] == '-') {
- /* hyphen is valid */
+ } else if (resp[j] == '-') {
+ /* hyphen is valid */
} else if (resp[j] >= 'A' && resp[j] <= 'Z') {
/* A-Z is valid */
} else if (resp[j] >= 'a' && resp[j] <= 'z') {
@@ -2092,7 +2092,7 @@ static int chk_failed = 0;
-main(void)
+xmain(void)
/*
test_the_test_environment(0);