dovecot-2.2: lib: Added (void) prefixes to some setsockopt() cal...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 12 23:20:36 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/e279bd060c28
changeset: 17459:e279bd060c28
user: Timo Sirainen <tss at iki.fi>
date: Fri Jun 13 00:03:11 2014 +0300
description:
lib: Added (void) prefixes to some setsockopt() calls which we don't care if they fail.
diffstat:
src/lib/net.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (34 lines):
diff -r fd6d650f292e -r e279bd060c28 src/lib/net.c
--- a/src/lib/net.c Fri Jun 13 00:00:31 2014 +0300
+++ b/src/lib/net.c Fri Jun 13 00:03:11 2014 +0300
@@ -203,8 +203,8 @@
}
/* set socket options */
- setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
- setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &opt, sizeof(opt));
+ (void)setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+ (void)setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &opt, sizeof(opt));
if (!blocking)
net_set_nonblock(fd, TRUE);
@@ -418,8 +418,8 @@
}
/* set socket options */
- setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
- setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &opt, sizeof(opt));
+ (void)setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+ (void)setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &opt, sizeof(opt));
if ((*flags & NET_LISTEN_FLAG_REUSEPORT) != 0) {
#ifdef SO_REUSEPORT
@@ -434,7 +434,7 @@
#ifdef IPV6_V6ONLY
if (so.sin.sin_family == AF_INET6) {
opt = 1;
- setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt));
+ (void)setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt));
}
#endif
/* specify the address/port we want to listen in */
More information about the dovecot-cvs
mailing list