[PATCH] Fix compilation error in util/vircgroup.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix the error

util/vircgroup.c: In function 'virCgroupNewDomainPartition':
util/vircgroup.c:1299:11: error: declaration of 'dirname' shadows a global declaration [-Werror=shadow]


Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxxxxxxxxxx>

---
 src/util/vircgroup.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: libvirt-acl/src/util/vircgroup.c
===================================================================
--- libvirt-acl.orig/src/util/vircgroup.c
+++ libvirt-acl/src/util/vircgroup.c
@@ -1296,13 +1296,13 @@ int virCgroupNewDomainPartition(virCgrou
                                 virCgroupPtr *group)
 {
     int rc;
-    char *dirname = NULL;
+    char *directoryname = NULL;

-    if (virAsprintf(&dirname, "%s.%s.libvirt",
+    if (virAsprintf(&directoryname, "%s.%s.libvirt",
                     name, driver) < 0)
         return -ENOMEM;

-    rc = virCgroupNew(dirname, partition, -1, group);
+    rc = virCgroupNew(directoryname, partition, -1, group);

     if (rc == 0) {
         /*
@@ -1322,7 +1322,7 @@ int virCgroupNewDomainPartition(virCgrou
         }
     }

-    VIR_FREE(dirname);
+    VIR_FREE(directoryname);
     return rc;
 }
 #else

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]