提交 54c226c1 编写于 作者: J John Ferlan

nwfilter: Consistently name virNWFilterPtr in driver

Use @nwfilter always for the name
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 5d5f7183
...@@ -384,7 +384,7 @@ nwfilterLookupByUUID(virConnectPtr conn, ...@@ -384,7 +384,7 @@ nwfilterLookupByUUID(virConnectPtr conn,
{ {
virNWFilterObjPtr obj; virNWFilterObjPtr obj;
virNWFilterDefPtr def; virNWFilterDefPtr def;
virNWFilterPtr ret = NULL; virNWFilterPtr nwfilter = NULL;
nwfilterDriverLock(); nwfilterDriverLock();
obj = nwfilterObjFromNWFilter(uuid); obj = nwfilterObjFromNWFilter(uuid);
...@@ -397,11 +397,11 @@ nwfilterLookupByUUID(virConnectPtr conn, ...@@ -397,11 +397,11 @@ nwfilterLookupByUUID(virConnectPtr conn,
if (virNWFilterLookupByUUIDEnsureACL(conn, def) < 0) if (virNWFilterLookupByUUIDEnsureACL(conn, def) < 0)
goto cleanup; goto cleanup;
ret = virGetNWFilter(conn, def->name, def->uuid); nwfilter = virGetNWFilter(conn, def->name, def->uuid);
cleanup: cleanup:
virNWFilterObjUnlock(obj); virNWFilterObjUnlock(obj);
return ret; return nwfilter;
} }
...@@ -411,7 +411,7 @@ nwfilterLookupByName(virConnectPtr conn, ...@@ -411,7 +411,7 @@ nwfilterLookupByName(virConnectPtr conn,
{ {
virNWFilterObjPtr obj; virNWFilterObjPtr obj;
virNWFilterDefPtr def; virNWFilterDefPtr def;
virNWFilterPtr ret = NULL; virNWFilterPtr nwfilter = NULL;
nwfilterDriverLock(); nwfilterDriverLock();
obj = virNWFilterObjListFindByName(driver->nwfilters, name); obj = virNWFilterObjListFindByName(driver->nwfilters, name);
...@@ -427,11 +427,11 @@ nwfilterLookupByName(virConnectPtr conn, ...@@ -427,11 +427,11 @@ nwfilterLookupByName(virConnectPtr conn,
if (virNWFilterLookupByNameEnsureACL(conn, def) < 0) if (virNWFilterLookupByNameEnsureACL(conn, def) < 0)
goto cleanup; goto cleanup;
ret = virGetNWFilter(conn, def->name, def->uuid); nwfilter = virGetNWFilter(conn, def->name, def->uuid);
cleanup: cleanup:
virNWFilterObjUnlock(obj); virNWFilterObjUnlock(obj);
return ret; return nwfilter;
} }
...@@ -467,7 +467,7 @@ nwfilterConnectListNWFilters(virConnectPtr conn, ...@@ -467,7 +467,7 @@ nwfilterConnectListNWFilters(virConnectPtr conn,
static int static int
nwfilterConnectListAllNWFilters(virConnectPtr conn, nwfilterConnectListAllNWFilters(virConnectPtr conn,
virNWFilterPtr **filters, virNWFilterPtr **nwfilters,
unsigned int flags) unsigned int flags)
{ {
int ret; int ret;
...@@ -478,7 +478,7 @@ nwfilterConnectListAllNWFilters(virConnectPtr conn, ...@@ -478,7 +478,7 @@ nwfilterConnectListAllNWFilters(virConnectPtr conn,
return -1; return -1;
nwfilterDriverLock(); nwfilterDriverLock();
ret = virNWFilterObjListExport(conn, driver->nwfilters, filters, ret = virNWFilterObjListExport(conn, driver->nwfilters, nwfilters,
virConnectListAllNWFiltersCheckACL); virConnectListAllNWFiltersCheckACL);
nwfilterDriverUnlock(); nwfilterDriverUnlock();
...@@ -492,7 +492,7 @@ nwfilterDefineXML(virConnectPtr conn, ...@@ -492,7 +492,7 @@ nwfilterDefineXML(virConnectPtr conn,
virNWFilterDefPtr def; virNWFilterDefPtr def;
virNWFilterObjPtr obj = NULL; virNWFilterObjPtr obj = NULL;
virNWFilterDefPtr objdef; virNWFilterDefPtr objdef;
virNWFilterPtr ret = NULL; virNWFilterPtr nwfilter = NULL;
if (!driver->privileged) { if (!driver->privileged) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
...@@ -520,7 +520,7 @@ nwfilterDefineXML(virConnectPtr conn, ...@@ -520,7 +520,7 @@ nwfilterDefineXML(virConnectPtr conn,
goto cleanup; goto cleanup;
} }
ret = virGetNWFilter(conn, objdef->name, objdef->uuid); nwfilter = virGetNWFilter(conn, objdef->name, objdef->uuid);
cleanup: cleanup:
virNWFilterDefFree(def); virNWFilterDefFree(def);
...@@ -530,7 +530,7 @@ nwfilterDefineXML(virConnectPtr conn, ...@@ -530,7 +530,7 @@ nwfilterDefineXML(virConnectPtr conn,
virNWFilterCallbackDriversUnlock(); virNWFilterCallbackDriversUnlock();
virNWFilterUnlockFilterUpdates(); virNWFilterUnlockFilterUpdates();
nwfilterDriverUnlock(); nwfilterDriverUnlock();
return ret; return nwfilter;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部