summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http-message.c6
-rw-r--r--src/http-message.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/http-message.c b/src/http-message.c
index a184fa1..ad14ce7 100644
--- a/src/http-message.c
+++ b/src/http-message.c
@@ -188,18 +188,16 @@ http_message_set_body (http_message_t msg, const char *body, size_t len)
*/
int
http_message_add_headers (http_message_t msg, const char **headers,
- int num_headers)
+ unsigned int num_headers)
{
const char **new_headers;
- int i;
+ unsigned int i;
/* Check for valid arguments */
if (msg == NULL)
return -EFAULT;
if (headers == NULL)
return -EINVAL;
- if (num_headers < 1)
- return -EINVAL;
/*
* If the number of headers to add is greater than the space
diff --git a/src/http-message.h b/src/http-message.h
index 094945b..fdf2982 100644
--- a/src/http-message.h
+++ b/src/http-message.h
@@ -88,6 +88,7 @@ extern int http_message_set_response (http_message_t msg,
* sent.
*/
extern int http_message_add_headers (http_message_t msg,
- const char **headers, int num_headers);
+ const char **headers,
+ unsigned int num_headers);
#endif /* _TINYPROXY_HTTP_MESSAGE_H_ */