diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-07-28 13:47:09 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-07-28 13:47:09 +0300 |
commit | 0eb4d030aef5eedce992e45a4e0d84e898743143 (patch) | |
tree | e6bd134cd71a7db437070e64efd30d3a5102d08c /src/microhttpd/test_http_reasons.c | |
parent | f493fd84dc01ed2940e56de0634772ddb4e56139 (diff) | |
download | libmicrohttpd-0eb4d030aef5eedce992e45a4e0d84e898743143.tar.gz libmicrohttpd-0eb4d030aef5eedce992e45a4e0d84e898743143.zip |
test_http_reasons: fixed
The test was broken with update for new API
Diffstat (limited to 'src/microhttpd/test_http_reasons.c')
-rw-r--r-- | src/microhttpd/test_http_reasons.c | 7 |
1 files 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 @@ | |||
31 | 31 | ||
32 | static const char *const r_unknown = "unknown"; | 32 | static const char *const r_unknown = "unknown"; |
33 | 33 | ||
34 | /* Return zero when no error is detected */ | ||
34 | static int | 35 | static int |
35 | expect_result (int code, const char *expected) | 36 | expect_result (int code, const char *expected) |
36 | { | 37 | { |
@@ -42,7 +43,7 @@ expect_result (int code, const char *expected) | |||
42 | fprintf (stderr, | 43 | fprintf (stderr, |
43 | "Incorrect reason returned for code %d:\n Returned: \"%s\" \tExpected: \"%s\"\n", | 44 | "Incorrect reason returned for code %d:\n Returned: \"%s\" \tExpected: \"%s\"\n", |
44 | code, reason, expected); | 45 | code, reason, expected); |
45 | return 0; | 46 | return 1; |
46 | } | 47 | } |
47 | if (r_unknown == expected) | 48 | if (r_unknown == expected) |
48 | exp_len = 0; | 49 | exp_len = 0; |
@@ -53,9 +54,9 @@ expect_result (int code, const char *expected) | |||
53 | fprintf (stderr, | 54 | fprintf (stderr, |
54 | "Incorrect reason length returned for code %d:\n Returned: \"%u\" \tExpected: \"%u\"\n", | 55 | "Incorrect reason length returned for code %d:\n Returned: \"%u\" \tExpected: \"%u\"\n", |
55 | code, (unsigned) len, (unsigned) exp_len); | 56 | code, (unsigned) len, (unsigned) exp_len); |
56 | return 0; | 57 | return 1; |
57 | } | 58 | } |
58 | return 1; | 59 | return 0; |
59 | } | 60 | } |
60 | 61 | ||
61 | 62 | ||