From 987846582ed27dc699f0f0c4143010ffd2c19329 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 23 Aug 2021 07:37:40 +0200 Subject: -fix indentation --- src/util/network.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/util/network.c b/src/util/network.c index 61da37ab7..014701e02 100644 --- a/src/util/network.c +++ b/src/util/network.c @@ -506,15 +506,15 @@ GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc, #endif if (AF_UNIX == address->sa_family) GNUNET_NETWORK_unix_precheck ((const struct sockaddr_un *) address); + { const int on = 1; - /* This is required here for TCP sockets, but only on UNIX */ - if ((SOCK_STREAM == desc->type) && - (0 != setsockopt (desc->fd, - SOL_SOCKET, - SO_REUSEADDR, - &on, sizeof(on)))) + if ( (SOCK_STREAM == desc->type) && + (0 != setsockopt (desc->fd, + SOL_SOCKET, + SO_REUSEADDR, + &on, sizeof(on))) ) LOG_STRERROR (GNUNET_ERROR_TYPE_DEBUG, "setsockopt"); } @@ -883,15 +883,13 @@ GNUNET_NETWORK_socket_setsockopt (struct GNUNET_NETWORK_Handle *fd, const void *option_value, socklen_t option_len) { - int ret; - - ret = setsockopt (fd->fd, - level, - option_name, - option_value, - option_len); - - return ret == 0 ? GNUNET_OK : GNUNET_SYSERR; + return (0 == setsockopt (fd->fd, + level, + option_name, + option_value, + option_len)) + ? GNUNET_OK + : GNUNET_SYSERR; } -- cgit v1.2.3