aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-08 23:36:41 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-08 23:36:41 +0200
commitde872dea2d88f183c3f434c694acdcdb373f639c (patch)
treefb9084eb931c9789060e65ee3be3dc5adcb30e73 /src/microhttpd
parent6347f514aa2388e774d5bf356df8046864e5f73c (diff)
downloadlibmicrohttpd-de872dea2d88f183c3f434c694acdcdb373f639c.tar.gz
libmicrohttpd-de872dea2d88f183c3f434c694acdcdb373f639c.zip
define and use 'enum MHD_Result'
Diffstat (limited to 'src/microhttpd')
-rw-r--r--src/microhttpd/test_daemon.c6
-rw-r--r--src/microhttpd/test_postprocessor.c12
-rw-r--r--src/microhttpd/test_postprocessor_amp.c2
-rw-r--r--src/microhttpd/test_postprocessor_large.c2
-rw-r--r--src/microhttpd/test_upgrade.c4
-rw-r--r--src/microhttpd/test_upgrade_large.c4
6 files changed, 15 insertions, 15 deletions
diff --git a/src/microhttpd/test_daemon.c b/src/microhttpd/test_daemon.c
index 4f600ef0..430c8e18 100644
--- a/src/microhttpd/test_daemon.c
+++ b/src/microhttpd/test_daemon.c
@@ -52,7 +52,7 @@ testStartError ()
52} 52}
53 53
54 54
55static int 55static enum MHD_Result
56apc_nothing (void *cls, 56apc_nothing (void *cls,
57 const struct sockaddr *addr, 57 const struct sockaddr *addr,
58 socklen_t addrlen) 58 socklen_t addrlen)
@@ -63,7 +63,7 @@ apc_nothing (void *cls,
63} 63}
64 64
65 65
66static int 66static enum MHD_Result
67apc_all (void *cls, 67apc_all (void *cls,
68 const struct sockaddr *addr, 68 const struct sockaddr *addr,
69 socklen_t addrlen) 69 socklen_t addrlen)
@@ -74,7 +74,7 @@ apc_all (void *cls,
74} 74}
75 75
76 76
77static int 77static enum MHD_Result
78ahc_nothing (void *cls, 78ahc_nothing (void *cls,
79 struct MHD_Connection *connection, 79 struct MHD_Connection *connection,
80 const char *url, 80 const char *url,
diff --git a/src/microhttpd/test_postprocessor.c b/src/microhttpd/test_postprocessor.c
index 2c37565c..e70171cc 100644
--- a/src/microhttpd/test_postprocessor.c
+++ b/src/microhttpd/test_postprocessor.c
@@ -92,7 +92,7 @@ mismatch (const char *a, const char *b)
92} 92}
93 93
94 94
95static int 95static enum MHD_Result
96value_checker (void *cls, 96value_checker (void *cls,
97 enum MHD_ValueKind kind, 97 enum MHD_ValueKind kind,
98 const char *key, 98 const char *key,
@@ -140,10 +140,10 @@ value_checker (void *cls,
140 fprintf (stderr, 140 fprintf (stderr,
141 "Wanted: `%s' `%s' `%s' `%s' `%s'\n", 141 "Wanted: `%s' `%s' `%s' `%s' `%s'\n",
142 want[idx], 142 want[idx],
143 want[idx+1], 143 want[idx + 1],
144 want[idx+2], 144 want[idx + 2],
145 want[idx+3], 145 want[idx + 3],
146 want[idx+4]); 146 want[idx + 4]);
147 fprintf (stderr, 147 fprintf (stderr,
148 "Unexpected result: %d/%d/%d/%d/%d/%d/%d\n", 148 "Unexpected result: %d/%d/%d/%d/%d/%d/%d\n",
149 (idx < 0), 149 (idx < 0),
@@ -155,7 +155,7 @@ value_checker (void *cls,
155 (0 != memcmp (data, &want[idx + 4][off], size))); 155 (0 != memcmp (data, &want[idx + 4][off], size)));
156 return MHD_NO; 156 return MHD_NO;
157 } 157 }
158 if ( ( (NULL == want[idx+4]) && 158 if ( ( (NULL == want[idx + 4]) &&
159 (0 == off + size) ) || 159 (0 == off + size) ) ||
160 (off + size == strlen (want[idx + 4])) ) 160 (off + size == strlen (want[idx + 4])) )
161 *want_off = idx + 5; 161 *want_off = idx + 5;
diff --git a/src/microhttpd/test_postprocessor_amp.c b/src/microhttpd/test_postprocessor_amp.c
index 54936979..8692d443 100644
--- a/src/microhttpd/test_postprocessor_amp.c
+++ b/src/microhttpd/test_postprocessor_amp.c
@@ -7,7 +7,7 @@
7 7
8uint64_t num_errors; 8uint64_t num_errors;
9 9
10int 10enum MHD_Result
11check_post (void *cls, enum MHD_ValueKind kind, const char*key, 11check_post (void *cls, enum MHD_ValueKind kind, const char*key,
12 const char*filename, const char*content_type, 12 const char*filename, const char*content_type,
13 const char*content_encoding, const char*data, 13 const char*content_encoding, const char*data,
diff --git a/src/microhttpd/test_postprocessor_large.c b/src/microhttpd/test_postprocessor_large.c
index 0e2a10d2..678de808 100644
--- a/src/microhttpd/test_postprocessor_large.c
+++ b/src/microhttpd/test_postprocessor_large.c
@@ -33,7 +33,7 @@
33#include <unistd.h> 33#include <unistd.h>
34#endif 34#endif
35 35
36static int 36static enum MHD_Result
37value_checker (void *cls, 37value_checker (void *cls,
38 enum MHD_ValueKind kind, 38 enum MHD_ValueKind kind,
39 const char *key, 39 const char *key,
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index 404c2854..b3aecafa 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -843,7 +843,7 @@ upgrade_cb (void *cls,
843 * #MHD_NO if the socket must be closed due to a serios 843 * #MHD_NO if the socket must be closed due to a serios
844 * error while handling the request 844 * error while handling the request
845 */ 845 */
846static int 846static enum MHD_Result
847ahc_upgrade (void *cls, 847ahc_upgrade (void *cls,
848 struct MHD_Connection *connection, 848 struct MHD_Connection *connection,
849 const char *url, 849 const char *url,
@@ -854,7 +854,7 @@ ahc_upgrade (void *cls,
854 void **con_cls) 854 void **con_cls)
855{ 855{
856 struct MHD_Response *resp; 856 struct MHD_Response *resp;
857 int ret; 857 enum MHD_Result ret;
858 (void) cls; 858 (void) cls;
859 (void) url; 859 (void) url;
860 (void) method; /* Unused. Silent compiler warning. */ 860 (void) method; /* Unused. Silent compiler warning. */
diff --git a/src/microhttpd/test_upgrade_large.c b/src/microhttpd/test_upgrade_large.c
index a17293db..d8d35838 100644
--- a/src/microhttpd/test_upgrade_large.c
+++ b/src/microhttpd/test_upgrade_large.c
@@ -867,7 +867,7 @@ upgrade_cb (void *cls,
867 * #MHD_NO if the socket must be closed due to a serios 867 * #MHD_NO if the socket must be closed due to a serios
868 * error while handling the request 868 * error while handling the request
869 */ 869 */
870static int 870static enum MHD_Result
871ahc_upgrade (void *cls, 871ahc_upgrade (void *cls,
872 struct MHD_Connection *connection, 872 struct MHD_Connection *connection,
873 const char *url, 873 const char *url,
@@ -878,7 +878,7 @@ ahc_upgrade (void *cls,
878 void **con_cls) 878 void **con_cls)
879{ 879{
880 struct MHD_Response *resp; 880 struct MHD_Response *resp;
881 int ret; 881 enum MHD_Result ret;
882 (void) cls; 882 (void) cls;
883 (void) url; 883 (void) url;
884 (void) method; /* Unused. Silent compiler warning. */ 884 (void) method; /* Unused. Silent compiler warning. */