]> xenbits.xensource.com Git - libvirt.git/commitdiff
net: Change argument type of virNetworkObjIsDuplicate()
authorPeter Krempa <pkrempa@redhat.com>
Thu, 25 Oct 2012 12:19:59 +0000 (14:19 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 2 Nov 2012 12:28:39 +0000 (13:28 +0100)
The argument check_active is used only as a boolean so this patch
changes the type and updates callers.

src/conf/network_conf.c
src/conf/network_conf.h
src/network/bridge_driver.c

index 7bd7ba9db2951dabc56225a7e6375ef9e790f42e..e9a8d0a396271025214f6574e4f32dbad608015a 100644 (file)
@@ -3061,7 +3061,7 @@ cleanup:
 int
 virNetworkObjIsDuplicate(virNetworkObjListPtr doms,
                          virNetworkDefPtr def,
-                         unsigned int check_active)
+                         bool check_active)
 {
     int ret = -1;
     int dupVM = 0;
index 4c0c8c1fbfc818b192ebdb16863009a61ef93fce..3e463047f829176302a5322e39c5ab55a6d18199 100644 (file)
@@ -337,7 +337,7 @@ virNetworkObjUpdate(virNetworkObjPtr obj,
 
 int virNetworkObjIsDuplicate(virNetworkObjListPtr doms,
                              virNetworkDefPtr def,
-                             unsigned int check_active);
+                             bool check_active);
 
 void virNetworkObjLock(virNetworkObjPtr obj);
 void virNetworkObjUnlock(virNetworkObjPtr obj);
index 3dbf00987a873d60750c6ab2d34966ee928147b3..6f9fcdadd22952b60fa567c11c8da175acce34ae 100644 (file)
@@ -2690,7 +2690,7 @@ static virNetworkPtr networkCreate(virConnectPtr conn, const char *xml) {
     if (!(def = virNetworkDefParseString(xml)))
         goto cleanup;
 
-    if (virNetworkObjIsDuplicate(&driver->networks, def, 1) < 0)
+    if (virNetworkObjIsDuplicate(&driver->networks, def, true) < 0)
         goto cleanup;
 
     /* Only the three L3 network types that are configured by libvirt
@@ -2749,7 +2749,7 @@ static virNetworkPtr networkDefine(virConnectPtr conn, const char *xml) {
     if (!(def = virNetworkDefParseString(xml)))
         goto cleanup;
 
-    if (virNetworkObjIsDuplicate(&driver->networks, def, 0) < 0)
+    if (virNetworkObjIsDuplicate(&driver->networks, def, false) < 0)
         goto cleanup;
 
     /* Only the three L3 network types that are configured by libvirt