commit 64d90a1a85091c8aaa707dd84e47e8b0b990b767
parent 5083df300e85aa1c5438fc85d4386330cee4322e
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 25 Sep 2023 21:49:57 +0200
-tighten test further
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/test_str_token_remove.c b/src/microhttpd/test_str_token_remove.c
@@ -63,7 +63,7 @@ expect_result_n (const char *str, size_t str_len,
buf_out, &result_len);
if (buf_len < expected_len)
{ /* The result should not fit into the buffer */
- if (res || (0 < result_len))
+ if (res || (0 <= result_len))
{
fprintf (stderr,
"MHD_str_remove_token_caseless_() FAILED:\n"
@@ -78,6 +78,7 @@ expect_result_n (const char *str, size_t str_len,
else
{ /* The result should fit into the buffer */
if ( (expected_removed != res) ||
+ (result_len < 0) ||
(expected_len != (size_t) result_len) ||
((0 != result_len) && (0 != memcmp (expected, buf_out,
(size_t) result_len))) ||