libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 0eb4d030aef5eedce992e45a4e0d84e898743143
parent f493fd84dc01ed2940e56de0634772ddb4e56139
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed, 28 Jul 2021 13:47:09 +0300

test_http_reasons: fixed

The test was broken with update for new API

Diffstat:
Msrc/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 @@ -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; }