aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2019-05-25 15:15:03 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2019-05-25 15:15:03 +0300
commit6d210e7986375d208a75d3a7c82f799e34358645 (patch)
tree5b3e4424b392fb697342dc7eaf4ceb7a5d4da78b /src/microhttpd/daemon.c
parent2eb0a5f92d7496e36bbdcb7c1c8ba1d3a829ced0 (diff)
downloadlibmicrohttpd-6d210e7986375d208a75d3a7c82f799e34358645.tar.gz
libmicrohttpd-6d210e7986375d208a75d3a7c82f799e34358645.zip
Eliminated one compiler warning, checking is more correct now
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 2ee367c4..5c35373d 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -4920,10 +4920,13 @@ parse_options_va (struct MHD_Daemon *daemon,
4920 case MHD_OPTION_CONNECTION_TIMEOUT: 4920 case MHD_OPTION_CONNECTION_TIMEOUT:
4921 uv = va_arg (ap, 4921 uv = va_arg (ap,
4922 unsigned int); 4922 unsigned int);
4923 daemon->connection_timeout = (time_t)uv;
4923 /* Next comparison could be always false on some platforms and whole branch will 4924 /* Next comparison could be always false on some platforms and whole branch will
4924 * be optimized out on those platforms. On others it will be compiled into real 4925 * be optimized out on those platforms. On others it will be compiled into real
4925 * check. */ 4926 * check. */
4926 if (TIME_T_MAX < uv) /* Compiler may warn on some platforms, ignore warning. */ 4927 if ( ( (MHD_TYPE_IS_SIGNED_(time_t)) &&
4928 (daemon->connection_timeout < 0) ) || /* Compiler may warn on some platforms, ignore warning. */
4929 (uv != (unsigned int)daemon->connection_timeout) )
4927 { 4930 {
4928#ifdef HAVE_MESSAGES 4931#ifdef HAVE_MESSAGES
4929 MHD_DLOG (daemon, 4932 MHD_DLOG (daemon,
@@ -4931,8 +4934,6 @@ parse_options_va (struct MHD_Daemon *daemon,
4931#endif 4934#endif
4932 daemon->connection_timeout = 0; 4935 daemon->connection_timeout = 0;
4933 } 4936 }
4934 else
4935 daemon->connection_timeout = (time_t)uv;
4936 break; 4937 break;
4937 case MHD_OPTION_NOTIFY_COMPLETED: 4938 case MHD_OPTION_NOTIFY_COMPLETED:
4938 daemon->notify_completed = va_arg (ap, 4939 daemon->notify_completed = va_arg (ap,