From 9254cbe875f6868c8428ed36caae0e6666bd2f49 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 12 Feb 2016 16:25:33 +0100 Subject: [PATCH] platform: don't return number of messages from event_handler_recvmsgs() The value is not used by the callers. Also, with @handle_events set to false, it is not clear what the value really means because we skip over errors. --- src/platform/nm-linux-platform.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 734f0ffac1..9ce4422ab6 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -5556,7 +5556,7 @@ event_handler_recvmsgs (NMPlatform *platform, gboolean handle_events) { NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform); struct nl_sock *sk = priv->nlh; - int n, err = 0, multipart = 0, interrupted = 0, nrecv = 0; + int n, err = 0, multipart = 0, interrupted = 0; struct nlmsghdr *hdr; WaitForNlResponseResult seq_result; @@ -5612,7 +5612,6 @@ continue_reading: nlmsg_set_proto (msg, NETLINK_ROUTE); nlmsg_set_src (msg, &nla); - nrecv++; if (!creds || creds->pid) { if (creds) @@ -5720,10 +5719,6 @@ stop: out: if (interrupted) err = -NLE_DUMP_INTR; - - if (!err) - err = nrecv; - return err; }