net: Change argument type of virNetworkObjIsDuplicate()

The argument check_active is used only as a boolean so this patch
changes the type and updates callers.
This commit is contained in:
Peter Krempa 2012-10-25 14:19:59 +02:00
parent f823089124
commit a3258c0eb9
3 changed files with 4 additions and 4 deletions

View 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;

View 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);

View 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