[PATCH 2/2] virsh: Don't shadow global variable "remove" in cmdMetadata

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

 



Some systems apparently have a global variable/function called remove
and thus break compilation of virsh-domain.c. Rename the variable to
avoid this.

Reported by GuanQiang.
---
 tools/virsh-domain.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 801b5dd..49cd154 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -6854,7 +6854,7 @@ cmdMetadata(vshControl *ctl, const vshCmd *cmd)
     bool live = vshCommandOptBool(cmd, "live");
     bool current = vshCommandOptBool(cmd, "current");
     bool edit = vshCommandOptBool(cmd, "edit");
-    bool remove = vshCommandOptBool(cmd, "remove");
+    bool rem = vshCommandOptBool(cmd, "remove");
     const char *set = NULL;
     const char *uri = NULL;
     const char *key = NULL;
@@ -6886,12 +6886,12 @@ cmdMetadata(vshControl *ctl, const vshCmd *cmd)
         goto cleanup;
     }

-    if (set || remove) {
+    if (set || rem) {
         if (virDomainSetMetadata(dom, VIR_DOMAIN_METADATA_ELEMENT,
                                  set, key, uri, flags))
             goto cleanup;

-        if (remove)
+        if (rem)
             vshPrint("%s\n", _("Metadata removed"));
         else
             vshPrint("%s\n", _("Metadata modified"));
-- 
1.8.3.2

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