[systemd-commits] 3 commits - src/libsystemd src/resolve src/shared
David Herrmann
dvdhrm at kemper.freedesktop.org
Mon Nov 17 02:10:10 PST 2014
src/libsystemd/sd-bus/bus-socket.c | 4 ++--
src/resolve/resolved-dns-scope.c | 4 ++--
src/shared/log.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 3aeaee978a03b1fcc0fd0265c0dd9680c8a19694
Author: Susant Sahani <susant at redhat.com>
Date: Tue Nov 11 13:36:33 2014 +0530
bus-socket: fix CID#996290 Unchecked return value
diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
index d124d9a..d02994e 100644
--- a/src/libsystemd/sd-bus/bus-socket.c
+++ b/src/libsystemd/sd-bus/bus-socket.c
@@ -610,10 +610,10 @@ void bus_socket_setup(sd_bus *b) {
/* Enable SO_PASSCRED + SO_PASSEC. We try this on any
* socket, just in case. */
enable = !b->bus_client;
- setsockopt(b->input_fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable));
+ (void)setsockopt(b->input_fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable));
enable = !b->bus_client && (b->attach_flags & KDBUS_ATTACH_SECLABEL);
- setsockopt(b->input_fd, SOL_SOCKET, SO_PASSSEC, &enable, sizeof(enable));
+ (void)setsockopt(b->input_fd, SOL_SOCKET, SO_PASSSEC, &enable, sizeof(enable));
/* Increase the buffers to 8 MB */
fd_inc_rcvbuf(b->input_fd, SNDBUF_SIZE);
commit 0c9eefb7e3a39db832313b8411a4dcb9fdfe3607
Author: Susant Sahani <susant at redhat.com>
Date: Tue Nov 11 13:36:32 2014 +0530
resolve: fix CID#1237549 Unchecked return value
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c
index 1664b13..fd4f5f7 100644
--- a/src/resolve/resolved-dns-scope.c
+++ b/src/resolve/resolved-dns-scope.c
@@ -386,7 +386,7 @@ int dns_scope_llmnr_membership(DnsScope *s, bool b) {
* one. This is necessary on some devices, such as
* veth. */
if (b)
- setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreqn, sizeof(mreqn));
+ (void)setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreqn, sizeof(mreqn));
if (setsockopt(fd, IPPROTO_IP, b ? IP_ADD_MEMBERSHIP : IP_DROP_MEMBERSHIP, &mreqn, sizeof(mreqn)) < 0)
return -errno;
@@ -402,7 +402,7 @@ int dns_scope_llmnr_membership(DnsScope *s, bool b) {
return fd;
if (b)
- setsockopt(fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, &mreq, sizeof(mreq));
+ (void)setsockopt(fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, &mreq, sizeof(mreq));
if (setsockopt(fd, IPPROTO_IPV6, b ? IPV6_ADD_MEMBERSHIP : IPV6_DROP_MEMBERSHIP, &mreq, sizeof(mreq)) < 0)
return -errno;
commit 9593d9d9d505d38b1b0fb3d492268d513f228b88
Author: Susant Sahani <susant at redhat.com>
Date: Tue Nov 11 13:36:31 2014 +0530
log: unchecked return value from library
fix 1237557 Unchecked return value from library
diff --git a/src/shared/log.c b/src/shared/log.c
index 1c589ac..d465311 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -122,7 +122,7 @@ static int create_log_socket(int type) {
timeval_store(&tv, 10 * USEC_PER_MSEC);
else
timeval_store(&tv, 10 * USEC_PER_SEC);
- setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
+ (void)setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
return fd;
}
More information about the systemd-commits
mailing list