]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Don't shadow global variable "remove" in cmdMetadata
authorPeter Krempa <pkrempa@redhat.com>
Tue, 17 Sep 2013 11:40:08 +0000 (13:40 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 Sep 2013 11:57:32 +0000 (13:57 +0200)
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

index 801b5dd1b6b20a00fbf2d8df156a273f3c33b4e6..49cd15422a394b164b14e25c773d2a25cc66f994 100644 (file)
@@ -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"));