render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
c401cc
From b04dcdee9c66d99017d00c8b16a335f0b148ffab Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <b04dcdee9c66d99017d00c8b16a335f0b148ffab@dist-git>
c401cc
From: Peter Krempa <pkrempa@redhat.com>
c401cc
Date: Wed, 26 Feb 2014 14:54:12 +0100
c401cc
Subject: [PATCH] conf: Rename virDomainDiskHostDefFree to
c401cc
 virDomainDiskHostDefClear
c401cc
c401cc
https://bugzilla.redhat.com/show_bug.cgi?id=1032370
c401cc
c401cc
The function destroys only the contents not the object itself thus it
c401cc
should be called Clear.
c401cc
c401cc
(cherry picked from commit 2b2decbdcc46b34dce6141f264a126373544bc00)
c401cc
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
---
c401cc
 src/conf/domain_conf.c   | 6 +++---
c401cc
 src/conf/domain_conf.h   | 2 +-
c401cc
 src/libvirt_private.syms | 2 +-
c401cc
 src/qemu/qemu_command.c  | 4 ++--
c401cc
 4 files changed, 7 insertions(+), 7 deletions(-)
c401cc
c401cc
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
c401cc
index 60e8849..eef2176 100644
c401cc
--- a/src/conf/domain_conf.c
c401cc
+++ b/src/conf/domain_conf.c
c401cc
@@ -1212,13 +1212,13 @@ void virDomainDiskDefFree(virDomainDiskDefPtr def)
c401cc
     }
c401cc
 
c401cc
     for (i = 0; i < def->nhosts; i++)
c401cc
-        virDomainDiskHostDefFree(&def->hosts[i]);
c401cc
+        virDomainDiskHostDefClear(&def->hosts[i]);
c401cc
     VIR_FREE(def->hosts);
c401cc
 
c401cc
     VIR_FREE(def);
c401cc
 }
c401cc
 
c401cc
-void virDomainDiskHostDefFree(virDomainDiskHostDefPtr def)
c401cc
+void virDomainDiskHostDefClear(virDomainDiskHostDefPtr def)
c401cc
 {
c401cc
     if (!def)
c401cc
         return;
c401cc
@@ -4959,7 +4959,7 @@ error:
c401cc
     VIR_FREE(protocol);
c401cc
     VIR_FREE(transport);
c401cc
     while (nhosts > 0) {
c401cc
-        virDomainDiskHostDefFree(&hosts[nhosts - 1]);
c401cc
+        virDomainDiskHostDefClear(&hosts[nhosts - 1]);
c401cc
         nhosts--;
c401cc
     }
c401cc
 
c401cc
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
c401cc
index 824fb8e..0a4316b 100644
c401cc
--- a/src/conf/domain_conf.h
c401cc
+++ b/src/conf/domain_conf.h
c401cc
@@ -2209,7 +2209,7 @@ void virDomainGraphicsDefFree(virDomainGraphicsDefPtr def);
c401cc
 void virDomainInputDefFree(virDomainInputDefPtr def);
c401cc
 void virDomainDiskDefFree(virDomainDiskDefPtr def);
c401cc
 void virDomainLeaseDefFree(virDomainLeaseDefPtr def);
c401cc
-void virDomainDiskHostDefFree(virDomainDiskHostDefPtr def);
c401cc
+void virDomainDiskHostDefClear(virDomainDiskHostDefPtr def);
c401cc
 int virDomainDeviceFindControllerModel(virDomainDefPtr def,
c401cc
                                        virDomainDeviceInfoPtr info,
c401cc
                                        int controllerType);
c401cc
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
c401cc
index c2ae2c8..72a5033 100644
c401cc
--- a/src/libvirt_private.syms
c401cc
+++ b/src/libvirt_private.syms
c401cc
@@ -195,7 +195,7 @@ virDomainDiskErrorPolicyTypeToString;
c401cc
 virDomainDiskFindByBusAndDst;
c401cc
 virDomainDiskGeometryTransTypeFromString;
c401cc
 virDomainDiskGeometryTransTypeToString;
c401cc
-virDomainDiskHostDefFree;
c401cc
+virDomainDiskHostDefClear;
c401cc
 virDomainDiskIndexByName;
c401cc
 virDomainDiskInsert;
c401cc
 virDomainDiskInsertPreAlloced;
c401cc
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
c401cc
index e6a6650..062b7e4 100644
c401cc
--- a/src/qemu/qemu_command.c
c401cc
+++ b/src/qemu/qemu_command.c
c401cc
@@ -3440,7 +3440,7 @@ cleanup:
c401cc
     return ret;
c401cc
 
c401cc
 error:
c401cc
-    virDomainDiskHostDefFree(def->hosts);
c401cc
+    virDomainDiskHostDefClear(def->hosts);
c401cc
     VIR_FREE(def->hosts);
c401cc
     goto cleanup;
c401cc
 }
c401cc
@@ -3542,7 +3542,7 @@ qemuParseNBDString(virDomainDiskDefPtr disk)
c401cc
     return 0;
c401cc
 
c401cc
 error:
c401cc
-    virDomainDiskHostDefFree(h);
c401cc
+    virDomainDiskHostDefClear(h);
c401cc
     VIR_FREE(h);
c401cc
     return -1;
c401cc
 }
c401cc
-- 
c401cc
1.9.0
c401cc