summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-23 07:37:40 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-23 07:37:40 +0200
commit987846582ed27dc699f0f0c4143010ffd2c19329 (patch)
treefc21f01e978b20569b333aa7076c824df5f30a0c /src
parent9ad1a017071f553b287e0aec37e913e954208ae6 (diff)
-fix indentation
Diffstat (limited to 'src')
-rw-r--r--src/util/network.c28
1 files changed, 13 insertions, 15 deletions
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;
}