[systemd-devel] [PATCH 2/3] resolved: fix CID 1237549 Unchecked return value

David Herrmann dh.herrmann at gmail.com
Mon Nov 17 01:59:22 PST 2014


Hi

On Tue, Nov 11, 2014 at 9:06 AM, Susant Sahani <susant at redhat.com> wrote:
> ---

Applied!

Thanks
David

>  src/resolve/resolved-dns-scope.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c
> index 1664b13..25e0d9e 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;
> --
> 2.1.0
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list