From 0eb4d030aef5eedce992e45a4e0d84e898743143 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Wed, 28 Jul 2021 13:47:09 +0300 Subject: [PATCH] test_http_reasons: fixed The test was broken with update for new API --- src/microhttpd/test_http_reasons.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/microhttpd/test_http_reasons.c b/src/microhttpd/test_http_reasons.c index b648c3b0..6a0b24b9 100644 --- a/src/microhttpd/test_http_reasons.c +++ b/src/microhttpd/test_http_reasons.c @@ -31,6 +31,7 @@ static const char *const r_unknown = "unknown"; +/* Return zero when no error is detected */ static int expect_result (int code, const char *expected) { @@ -42,7 +43,7 @@ expect_result (int code, const char *expected) fprintf (stderr, "Incorrect reason returned for code %d:\n Returned: \"%s\" \tExpected: \"%s\"\n", code, reason, expected); - return 0; + return 1; } if (r_unknown == expected) exp_len = 0; @@ -53,9 +54,9 @@ expect_result (int code, const char *expected) fprintf (stderr, "Incorrect reason length returned for code %d:\n Returned: \"%u\" \tExpected: \"%u\"\n", code, (unsigned) len, (unsigned) exp_len); - return 0; + return 1; } - return 1; + return 0; }