libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 28cb2cd769f1b0266a54773f1c0cbbc8bbf46dec
parent d1d5bf7cb9e99860fb0e9657b36436ac48690dbb
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 28 Sep 2012 21:35:58 +0000

-fix type to ensure that comparisson will always work

Diffstat:
Msrc/daemon/connection.c | 6+++---
Msrc/daemon/daemon.c | 2+-
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/daemon/connection.c b/src/daemon/connection.c @@ -364,7 +364,7 @@ connection_close_error (struct MHD_Connection *connection, static int try_ready_normal_body (struct MHD_Connection *connection) { - int ret; + ssize_t ret; struct MHD_Response *response; response = connection->response; @@ -433,7 +433,7 @@ try_ready_normal_body (struct MHD_Connection *connection) static int try_ready_chunked_body (struct MHD_Connection *connection) { - int ret; + ssize_t ret; char *buf; struct MHD_Response *response; size_t size; @@ -508,7 +508,7 @@ try_ready_chunked_body (struct MHD_Connection *connection) ret = 0xFFFFFF; snprintf (cbuf, sizeof (cbuf), - "%X\r\n", ret); + "%X\r\n", (unsigned int) ret); cblen = strlen (cbuf); EXTRA_CHECK (cblen <= sizeof (cbuf)); memcpy (&connection->write_buffer[sizeof (cbuf) - cblen], cbuf, cblen); diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c @@ -1783,7 +1783,7 @@ parse_options_va (struct MHD_Daemon *daemon, break; case MHD_OPTION_THREAD_POOL_SIZE: daemon->worker_pool_size = va_arg (ap, unsigned int); - if (daemon->worker_pool_size >= SIZE_MAX / sizeof (struct MHD_Daemon)) + if (daemon->worker_pool_size >= (SIZE_MAX / sizeof (struct MHD_Daemon))) { #if HAVE_MESSAGES MHD_DLOG (daemon,