[libvirt] [PATCH] virsh: Drop dead variables

Eric Blake posted 1 patch 5 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180831221822.757861-1-eblake@redhat.com
Test syntax-check passed
tools/virsh-snapshot.c | 6 ------
1 file changed, 6 deletions(-)
[libvirt] [PATCH] virsh: Drop dead variables
Posted by Eric Blake 5 years, 7 months ago
The helper function virshSnapshotCreate (formerly vshSnapshotCreate)
has had dead variables since commit a00c37f2 (Sep 2011).

Signed-off-by: Eric Blake <eblake@redhat.com>
---

Pushing under the trivial rule.

 tools/virsh-snapshot.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c
index 812fa91333..a4ea959230 100644
--- a/tools/virsh-snapshot.c
+++ b/tools/virsh-snapshot.c
@@ -50,9 +50,6 @@ virshSnapshotCreate(vshControl *ctl, virDomainPtr dom, const char *buffer,
     bool ret = false;
     virDomainSnapshotPtr snapshot;
     bool halt = false;
-    char *doc = NULL;
-    xmlDocPtr xml = NULL;
-    xmlXPathContextPtr ctxt = NULL;
     const char *name = NULL;

     snapshot = virDomainSnapshotCreateXML(dom, buffer, flags);
@@ -101,10 +98,7 @@ virshSnapshotCreate(vshControl *ctl, virDomainPtr dom, const char *buffer,
     ret = true;

  cleanup:
-    xmlXPathFreeContext(ctxt);
-    xmlFreeDoc(xml);
     virshDomainSnapshotFree(snapshot);
-    VIR_FREE(doc);
     return ret;
 }

-- 
2.17.1

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