[libvirt PATCH 23/25] vircgroup: move parentPath declaration

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

 



It's used only inside the if condition.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/util/vircgroup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index f4c1623567..6caeb2d7f4 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -893,7 +893,6 @@ virCgroupNewPartition(const char *path,
                       int controllers,
                       virCgroupPtr *group)
 {
-    g_autofree char *parentPath = NULL;
     g_autofree char *newPath = NULL;
     g_autoptr(virCgroup) parent = NULL;
     g_autoptr(virCgroup) newGroup = NULL;
@@ -915,7 +914,7 @@ virCgroupNewPartition(const char *path,
 
     if (STRNEQ(newPath, "/")) {
         char *tmp;
-        parentPath = g_strdup(newPath);
+        g_autofree char *parentPath = g_strdup(newPath);
 
         tmp = strrchr(parentPath, '/');
         tmp++;
-- 
2.26.2




[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]

  Powered by Linux