gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] 01/02: Improve readability of previous comm


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 01/02: Improve readability of previous commit d951b950ec1af5e6ba582a8a964dff2d9192ba41
Date: Sun, 26 Nov 2017 21:34:04 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 00eb9247fed79a71a6fbf4d34fffda23b064325b
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sun Nov 26 23:08:16 2017 +0300

    Improve readability of previous commit 
d951b950ec1af5e6ba582a8a964dff2d9192ba41
---
 src/testcurl/test_get.c | 72 +++++++++++++++++++++----------------------------
 1 file changed, 30 insertions(+), 42 deletions(-)

diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c
index 4f4a0944..081859f7 100644
--- a/src/testcurl/test_get.c
+++ b/src/testcurl/test_get.c
@@ -119,14 +119,12 @@ testInternalGet (int poll_flag)
   struct CBC cbc;
   CURLcode errornum;
 
-  if (0 == global_port)
+  if ( (0 == global_port) &&
+       (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 
)
     {
-      if (MHD_NO == MHD_is_feature_supported 
(MHD_FEATURE_AUTODETECT_BIND_PORT))
-       {
-         global_port = 1220;
-         if (oneone)
-           global_port += 20;
-       }
+      global_port = 1220;
+      if (oneone)
+        global_port += 20;
     }
 
   cbc.buf = buf;
@@ -188,14 +186,12 @@ testMultithreadedGet (int poll_flag)
   struct CBC cbc;
   CURLcode errornum;
 
-  if (0 == global_port)
+  if ( (0 == global_port) &&
+       (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 
)
     {
-      if (MHD_NO == MHD_is_feature_supported 
(MHD_FEATURE_AUTODETECT_BIND_PORT))
-       {
-         global_port = 1221;
-         if (oneone)
-           global_port += 20;
-       }
+      global_port = 1221;
+      if (oneone)
+        global_port += 20;
     }
 
   cbc.buf = buf;
@@ -257,14 +253,12 @@ testMultithreadedPoolGet (int poll_flag)
   struct CBC cbc;
   CURLcode errornum;
 
-  if (0 == global_port)
+  if ( (0 == global_port) &&
+       (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 
)
     {
-      if (MHD_NO == MHD_is_feature_supported 
(MHD_FEATURE_AUTODETECT_BIND_PORT))
-       {
-         global_port = 1222;
-         if (oneone)
-           global_port += 20;
-       }
+      global_port = 1222;
+      if (oneone)
+        global_port += 20;
     }
 
   cbc.buf = buf;
@@ -341,14 +335,12 @@ testExternalGet ()
   time_t start;
   struct timeval tv;
 
-  if (0 == global_port)
+  if ( (0 == global_port) &&
+       (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 
)
     {
-      if (MHD_NO == MHD_is_feature_supported 
(MHD_FEATURE_AUTODETECT_BIND_PORT))
-       {
-         global_port = 1223;
-         if (oneone)
-           global_port += 20;
-       }
+      global_port = 1223;
+      if (oneone)
+        global_port += 20;
     }
 
   multi = NULL;
@@ -567,14 +559,12 @@ testStopRace (int poll_flag)
     MHD_socket fd;
     struct MHD_Daemon *d;
 
-    if (0 == global_port)
+    if ( (0 == global_port) &&
+         (MHD_NO == MHD_is_feature_supported 
(MHD_FEATURE_AUTODETECT_BIND_PORT)) )
       {
-       if (MHD_NO == MHD_is_feature_supported 
(MHD_FEATURE_AUTODETECT_BIND_PORT))
-         {
-           global_port = 1224;
-           if (oneone)
-             global_port += 20;
-         }
+        global_port = 1224;
+        if (oneone)
+          global_port += 20;
       }
 
     d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | poll_flag,
@@ -682,14 +672,12 @@ testEmptyGet (int poll_flag)
   CURLcode errornum;
   int excess_found = 0;
 
-  if (0 == global_port)
+  if ( (0 == global_port) &&
+       (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 
)
     {
-      if (MHD_NO == MHD_is_feature_supported 
(MHD_FEATURE_AUTODETECT_BIND_PORT))
-       {
-         global_port = 1225;
-         if (oneone)
-           global_port += 20;
-       }
+      global_port = 1225;
+      if (oneone)
+        global_port += 20;
     }
 
   cbc.buf = buf;

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



reply via email to

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