aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-02-07 18:21:29 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-02-07 18:21:29 +0100
commit4c47cbcc5c3ebf0bc5a2bbf13b7cd5d64c765f0d (patch)
tree305317156cdb480d7f919380aee0a1b52a56bffb /src
parent49539d8f93a5c5cd1be37a8c95be13b178026260 (diff)
add code to silence false positive warning in gcc6.3
Diffstat (limited to 'src')
-rw-r--r--src/exchange/taler-exchange-httpd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c
index f1661b003..11cf00dd1 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -1125,12 +1125,16 @@ main (int argc,
{
MHD_socket sock = MHD_quiesce_daemon (mhd);
MHD_socket admin_sock;
+ int admin_sock_opened = GNUNET_NO;
pid_t chld;
int flags;
/* Set flags to make 'sock' inherited by child */
if (NULL != mhd_admin)
+ {
admin_sock = MHD_quiesce_daemon (mhd_admin);
+ admin_sock_opened = GNUNET_YES;
+ }
flags = fcntl (sock, F_GETFD);
GNUNET_assert (-1 != flags);
flags &= ~FD_CLOEXEC;
@@ -1154,7 +1158,7 @@ main (int argc,
"dup2");
_exit (1);
}
- if ( (NULL != mhd_admin) &&
+ if ( (GNUNET_YES == admin_sock_opened) &&
(4 != dup2 (admin_sock, 4)) )
{
GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
@@ -1179,7 +1183,7 @@ main (int argc,
before exiting; as the listen socket is no longer used,
close it here */
GNUNET_break (0 == close (sock));
- if (NULL != mhd_admin)
+ if (GNUNET_YES == admin_sock_opened)
GNUNET_break (0 == close (admin_sock));
while ( (0 != MHD_get_daemon_info (mhd,
MHD_DAEMON_INFO_CURRENT_CONNECTIONS)->num_connections) ||