提交 a3258c0e 编写于 作者: P Peter Krempa

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.
上级 f8230891
......@@ -3061,7 +3061,7 @@ cleanup:
int
virNetworkObjIsDuplicate(virNetworkObjListPtr doms,
virNetworkDefPtr def,
unsigned int check_active)
bool check_active)
{
int ret = -1;
int dupVM = 0;
......
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册