]> xenbits.xensource.com Git - libvirt.git/commitdiff
virnetlink: Drop unused variable from virNetlinkCommand()
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 3 Aug 2023 08:43:13 +0000 (10:43 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 3 Aug 2023 14:36:07 +0000 (16:36 +0200)
The fds variable inside of virNetlinkCommand() is not used
really. It's passed to memset() (hence compilers do not
complain), but that's about it. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
src/util/virnetlink.c

index 866f4d8f2b8fd968c6351b3c919830f67ae771a6..d964c439b4f02d917445a6fc680e2a2309e30567 100644 (file)
@@ -333,13 +333,10 @@ int virNetlinkCommand(struct nl_msg *nl_msg,
             .nl_pid    = dst_pid,
             .nl_groups = 0,
     };
-    struct pollfd fds[1];
     g_autofree struct nlmsghdr *temp_resp = NULL;
     g_autoptr(virNetlinkHandle) nlhandle = NULL;
     int len = 0;
 
-    memset(fds, 0, sizeof(fds));
-
     if (!(nlhandle = virNetlinkSendRequest(nl_msg, src_pid, nladdr,
                                            protocol, groups)))
         return -1;