提交 c718ffba 编写于 作者: D Daniel P. Berrange 提交者: Cole Robinson

Remove virConnectPtr arg from virNWFilterDefParse*

None of the virNWFilterDefParse* methods require a virConnectPtr
arg, so just drop it
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
(cherry picked from commit b77b16ce)
上级 b1b060f1
...@@ -2634,8 +2634,7 @@ cleanup: ...@@ -2634,8 +2634,7 @@ cleanup:
static virNWFilterDefPtr static virNWFilterDefPtr
virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED, virNWFilterDefParse(const char *xmlStr,
const char *xmlStr,
const char *filename) { const char *filename) {
virNWFilterDefPtr def = NULL; virNWFilterDefPtr def = NULL;
xmlDocPtr xml; xmlDocPtr xml;
...@@ -2650,18 +2649,16 @@ virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED, ...@@ -2650,18 +2649,16 @@ virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED,
virNWFilterDefPtr virNWFilterDefPtr
virNWFilterDefParseString(virConnectPtr conn, virNWFilterDefParseString(const char *xmlStr)
const char *xmlStr)
{ {
return virNWFilterDefParse(conn, xmlStr, NULL); return virNWFilterDefParse(xmlStr, NULL);
} }
virNWFilterDefPtr virNWFilterDefPtr
virNWFilterDefParseFile(virConnectPtr conn, virNWFilterDefParseFile(const char *filename)
const char *filename)
{ {
return virNWFilterDefParse(conn, NULL, filename); return virNWFilterDefParse(NULL, filename);
} }
...@@ -3056,7 +3053,7 @@ virNWFilterObjLoad(virConnectPtr conn, ...@@ -3056,7 +3053,7 @@ virNWFilterObjLoad(virConnectPtr conn,
virNWFilterDefPtr def; virNWFilterDefPtr def;
virNWFilterObjPtr nwfilter; virNWFilterObjPtr nwfilter;
if (!(def = virNWFilterDefParseFile(conn, path))) { if (!(def = virNWFilterDefParseFile(path))) {
return NULL; return NULL;
} }
......
...@@ -713,10 +713,8 @@ int virNWFilterLoadAllConfigs(virConnectPtr conn, ...@@ -713,10 +713,8 @@ int virNWFilterLoadAllConfigs(virConnectPtr conn,
char *virNWFilterConfigFile(const char *dir, char *virNWFilterConfigFile(const char *dir,
const char *name); const char *name);
virNWFilterDefPtr virNWFilterDefParseString(virConnectPtr conn, virNWFilterDefPtr virNWFilterDefParseString(const char *xml);
const char *xml); virNWFilterDefPtr virNWFilterDefParseFile(const char *filename);
virNWFilterDefPtr virNWFilterDefParseFile(virConnectPtr conn,
const char *filename);
void virNWFilterObjLock(virNWFilterObjPtr obj); void virNWFilterObjLock(virNWFilterObjPtr obj);
void virNWFilterObjUnlock(virNWFilterObjPtr obj); void virNWFilterObjUnlock(virNWFilterObjPtr obj);
......
...@@ -566,7 +566,7 @@ nwfilterDefineXML(virConnectPtr conn, ...@@ -566,7 +566,7 @@ nwfilterDefineXML(virConnectPtr conn,
nwfilterDriverLock(driver); nwfilterDriverLock(driver);
virNWFilterCallbackDriversLock(); virNWFilterCallbackDriversLock();
if (!(def = virNWFilterDefParseString(conn, xml))) if (!(def = virNWFilterDefParseString(xml)))
goto cleanup; goto cleanup;
if (virNWFilterDefineXMLEnsureACL(conn, def) < 0) if (virNWFilterDefineXMLEnsureACL(conn, def) < 0)
......
...@@ -36,7 +36,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml, ...@@ -36,7 +36,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
virResetLastError(); virResetLastError();
if (!(dev = virNWFilterDefParseString(NULL, inXmlData))) { if (!(dev = virNWFilterDefParseString(inXmlData))) {
if (expect_error) { if (expect_error) {
virResetLastError(); virResetLastError();
goto done; goto done;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册