All callers pass NULL/0.

Signed-off-by: Peter Krempa <pkre...@redhat.com>
---
 src/qemu/qemu_hotplug.c |  3 +--
 src/qemu/qemu_monitor.c | 15 ++-------------
 src/qemu/qemu_monitor.h |  1 -
 3 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 9f71977a4d..e126632507 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1414,7 +1414,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
     }

     if (qemuMonitorAddNetdev(priv->mon, &netprops,
-                             NULL, NULL, 0,
                              slirpfd, slirpfdName) < 0) {
         qemuDomainObjExitMonitor(vm);
         virDomainAuditNet(vm, NULL, net, "attach", false);
@@ -2185,7 +2184,7 @@ qemuDomainAttachChrDevice(virQEMUDriver *driver,

     if (netdevprops) {
         if (qemuMonitorAddNetdev(priv->mon, &netdevprops,
-                                 NULL, NULL, 0, -1, NULL) < 0)
+                                -1, NULL) < 0)
             goto exit_monitor;
     }

diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 57a9e9af62..a71311d0c4 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -2630,24 +2630,17 @@ qemuMonitorCloseFileHandle(qemuMonitor *mon,
 int
 qemuMonitorAddNetdev(qemuMonitor *mon,
                      virJSONValue **props,
-                     int *tapfd, char **tapfdName, int tapfdSize,
                      int slirpfd, char *slirpfdName)
 {
     int ret = -1;
-    size_t i = 0;

-    VIR_DEBUG("props=%p tapfd=%p tapfdName=%p tapfdSize=%d"
+    VIR_DEBUG("props=%p "
               "slirpfd=%d slirpfdName=%s",
-              props, tapfd, tapfdName, tapfdSize,
+              props,
               slirpfd, slirpfdName);

     QEMU_CHECK_MONITOR(mon);

-    for (i = 0; i < tapfdSize; i++) {
-        if (qemuMonitorSendFileHandle(mon, tapfdName[i], tapfd[i]) < 0)
-            goto cleanup;
-    }
-
     if (slirpfd > 0 &&
         qemuMonitorSendFileHandle(mon, slirpfdName, slirpfd) < 0)
         goto cleanup;
@@ -2656,10 +2649,6 @@ qemuMonitorAddNetdev(qemuMonitor *mon,

  cleanup:
     if (ret < 0) {
-        while (i--) {
-            if (qemuMonitorCloseFileHandle(mon, tapfdName[i]) < 0)
-                VIR_WARN("failed to close device handle '%s'", tapfdName[i]);
-        }
         if (qemuMonitorCloseFileHandle(mon, slirpfdName) < 0)
             VIR_WARN("failed to close device handle '%s'", slirpfdName);
     }
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 1008b33671..a49ef180c1 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -983,7 +983,6 @@ int qemuMonitorCloseFileHandle(qemuMonitor *mon,

 int qemuMonitorAddNetdev(qemuMonitor *mon,
                          virJSONValue **props,
-                         int *tapfd, char **tapfdName, int tapfdSize,
                          int slirpfd, char *slirpfdName);

 int qemuMonitorRemoveNetdev(qemuMonitor *mon,
-- 
2.35.1

Reply via email to