gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] branch master updated: Eliminated one compi


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: Eliminated one compiler warning, checking is more correct now
Date: Sat, 25 May 2019 14:16:03 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 6d210e79 Eliminated one compiler warning, checking is more correct now
6d210e79 is described below

commit 6d210e7986375d208a75d3a7c82f799e34358645
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sat May 25 15:15:03 2019 +0300

    Eliminated one compiler warning, checking is more correct now
---
 src/microhttpd/daemon.c | 7 ++++---
 1 file 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,
         case MHD_OPTION_CONNECTION_TIMEOUT:
           uv = va_arg (ap,
                        unsigned int);
+          daemon->connection_timeout = (time_t)uv;
           /* Next comparison could be always false on some platforms and whole 
branch will
            * be optimized out on those platforms. On others it will be 
compiled into real
            * check. */
-          if (TIME_T_MAX < uv) /* Compiler may warn on some platforms, ignore 
warning. */
+          if ( ( (MHD_TYPE_IS_SIGNED_(time_t)) &&
+                 (daemon->connection_timeout < 0) ) || /* Compiler may warn on 
some platforms, ignore warning. */
+               (uv != (unsigned int)daemon->connection_timeout) )
             {
 #ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
@@ -4931,8 +4934,6 @@ parse_options_va (struct MHD_Daemon *daemon,
 #endif
               daemon->connection_timeout = 0;
             }
-          else
-            daemon->connection_timeout = (time_t)uv;
           break;
         case MHD_OPTION_NOTIFY_COMPLETED:
           daemon->notify_completed = va_arg (ap,

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]