aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_str_token.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/test_str_token.c')
-rw-r--r--src/microhttpd/test_str_token.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/microhttpd/test_str_token.c b/src/microhttpd/test_str_token.c
index 0baca53d..1e1eab28 100644
--- a/src/microhttpd/test_str_token.c
+++ b/src/microhttpd/test_str_token.c
@@ -41,6 +41,7 @@ expect_found_n (const char *str, const char *token, size_t token_len)
41 return 0; 41 return 0;
42} 42}
43 43
44
44#define expect_found(s,t) expect_found_n ((s),(t),MHD_STATICSTR_LEN_ (t)) 45#define expect_found(s,t) expect_found_n ((s),(t),MHD_STATICSTR_LEN_ (t))
45 46
46static int 47static int
@@ -56,10 +57,12 @@ expect_not_found_n (const char *str, const char *token, size_t token_len)
56 return 0; 57 return 0;
57} 58}
58 59
60
59#define expect_not_found(s,t) expect_not_found_n ((s),(t),MHD_STATICSTR_LEN_ ( \ 61#define expect_not_found(s,t) expect_not_found_n ((s),(t),MHD_STATICSTR_LEN_ ( \
60 t)) 62 t))
61 63
62int check_match (void) 64int
65check_match (void)
63{ 66{
64 int errcount = 0; 67 int errcount = 0;
65 errcount += expect_found ("string", "string"); 68 errcount += expect_found ("string", "string");
@@ -85,7 +88,9 @@ int check_match (void)
85 return errcount; 88 return errcount;
86} 89}
87 90
88int check_not_match (void) 91
92int
93check_not_match (void)
89{ 94{
90 int errcount = 0; 95 int errcount = 0;
91 errcount += expect_not_found ("strin", "string"); 96 errcount += expect_not_found ("strin", "string");
@@ -111,7 +116,9 @@ int check_not_match (void)
111 return errcount; 116 return errcount;
112} 117}
113 118
114int main (int argc, char *argv[]) 119
120int
121main (int argc, char *argv[])
115{ 122{
116 int errcount = 0; 123 int errcount = 0;
117 (void) argc; (void) argv; /* Unused. Silent compiler warning. */ 124 (void) argc; (void) argv; /* Unused. Silent compiler warning. */