]> xenbits.xensource.com Git - libvirt.git/commitdiff
vircommand: Drop unused arguments from virCommandMassCloseGetFDs*()
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 28 Aug 2023 13:34:47 +0000 (15:34 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 13 Sep 2024 12:50:43 +0000 (14:50 +0200)
Both virCommandMassCloseGetFDsLinux() and
virCommandMassCloseGetFDsGeneric() take @cmd argument only to
mark it as unused. Drop it from both.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/util/vircommand.c

index a03fcc37ae736a37a38ac2e43ce7d9b055c38c40..8bd5e5e7711a5d192e767444fa52f5df390e08e4 100644 (file)
@@ -478,8 +478,7 @@ virExecCommon(virCommand *cmd, gid_t *groups, int ngroups)
  * onto child process (well, the one we will exec soon since this
  * is called from the child). */
 static int
-virCommandMassCloseGetFDsLinux(virCommand *cmd G_GNUC_UNUSED,
-                               virBitmap *fds)
+virCommandMassCloseGetFDsLinux(virBitmap *fds)
 {
     g_autoptr(DIR) dp = NULL;
     struct dirent *entry;
@@ -511,8 +510,7 @@ virCommandMassCloseGetFDsLinux(virCommand *cmd G_GNUC_UNUSED,
 # else /* !__linux__ */
 
 static int
-virCommandMassCloseGetFDsGeneric(virCommand *cmd G_GNUC_UNUSED,
-                                 virBitmap *fds)
+virCommandMassCloseGetFDsGeneric(virBitmap *fds)
 {
     virBitmapSetAll(fds);
     return 0;
@@ -547,10 +545,10 @@ virCommandMassCloseFrom(virCommand *cmd,
     fds = virBitmapNew(openmax);
 
 # ifdef __linux__
-    if (virCommandMassCloseGetFDsLinux(cmd, fds) < 0)
+    if (virCommandMassCloseGetFDsLinux(fds) < 0)
         return -1;
 # else
-    if (virCommandMassCloseGetFDsGeneric(cmd, fds) < 0)
+    if (virCommandMassCloseGetFDsGeneric(fds) < 0)
         return -1;
 # endif