summaryrefslogtreecommitdiff
path: root/src/mhd/mhd_config.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-20 01:23:02 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-20 01:23:02 +0100
commit8ce6d32f63a81e6ea61971859152e4a5ec3b7c40 (patch)
treea9fbee64baa4a2001bd039dcbcbe2704b13af0a2 /src/mhd/mhd_config.c
parent500a7fe2bb7a5a7c722946fb0c87324e0d8172e8 (diff)
downloadexchange-8ce6d32f63a81e6ea61971859152e4a5ec3b7c40.tar.gz
exchange-8ce6d32f63a81e6ea61971859152e4a5ec3b7c40.tar.bz2
exchange-8ce6d32f63a81e6ea61971859152e4a5ec3b7c40.zip
beautification
Diffstat (limited to 'src/mhd/mhd_config.c')
-rw-r--r--src/mhd/mhd_config.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/mhd/mhd_config.c b/src/mhd/mhd_config.c
index e4dbc44cc..128e1c273 100644
--- a/src/mhd/mhd_config.c
+++ b/src/mhd/mhd_config.c
@@ -208,7 +208,6 @@ TALER_MHD_open_unix_path (const char *unix_path,
{
struct GNUNET_NETWORK_Handle *nh;
struct sockaddr_un *un;
- int fd;
if (sizeof (un->sun_path) <= strlen (unix_path))
{
@@ -281,9 +280,13 @@ TALER_MHD_open_unix_path (const char *unix_path,
"set socket '%s' to mode %o\n",
unix_path,
unix_mode);
- fd = GNUNET_NETWORK_get_fd (nh);
- GNUNET_NETWORK_socket_free_memory_only_ (nh);
- return fd;
+ {
+ int fd;
+
+ fd = GNUNET_NETWORK_get_fd (nh);
+ GNUNET_NETWORK_socket_free_memory_only_ (nh);
+ return fd;
+ }
}
@@ -308,7 +311,6 @@ TALER_MHD_bind (const struct GNUNET_CONFIGURATION_Handle *cfg,
char *bind_to;
char *serve_unixpath;
mode_t unixpath_mode;
- int fh;
char port_str[6];
struct addrinfo hints;
struct addrinfo *res;
@@ -390,7 +392,11 @@ TALER_MHD_bind (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_SCHEDULER_shutdown ();
return -1;
}
- fh = GNUNET_NETWORK_get_fd (nh);
- GNUNET_NETWORK_socket_free_memory_only_ (nh);
- return fh;
+ {
+ int fh;
+
+ fh = GNUNET_NETWORK_get_fd (nh);
+ GNUNET_NETWORK_socket_free_memory_only_ (nh);
+ return fh;
+ }
}