提交 a591883a 编写于 作者: D Daniel P. Berrange 提交者: Laine Stump

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)
上级 d48b2398
......@@ -2649,8 +2649,7 @@ cleanup:
static virNWFilterDefPtr
virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED,
const char *xmlStr,
virNWFilterDefParse(const char *xmlStr,
const char *filename) {
virNWFilterDefPtr def = NULL;
xmlDocPtr xml;
......@@ -2665,18 +2664,16 @@ virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED,
virNWFilterDefPtr
virNWFilterDefParseString(virConnectPtr conn,
const char *xmlStr)
virNWFilterDefParseString(const char *xmlStr)
{
return virNWFilterDefParse(conn, xmlStr, NULL);
return virNWFilterDefParse(xmlStr, NULL);
}
virNWFilterDefPtr
virNWFilterDefParseFile(virConnectPtr conn,
const char *filename)
virNWFilterDefParseFile(const char *filename)
{
return virNWFilterDefParse(conn, NULL, filename);
return virNWFilterDefParse(NULL, filename);
}
......@@ -3074,7 +3071,7 @@ virNWFilterObjLoad(virConnectPtr conn,
virNWFilterDefPtr def;
virNWFilterObjPtr nwfilter;
if (!(def = virNWFilterDefParseFile(conn, path))) {
if (!(def = virNWFilterDefParseFile(path))) {
return NULL;
}
......
......@@ -714,10 +714,8 @@ int virNWFilterLoadAllConfigs(virConnectPtr conn,
char *virNWFilterConfigFile(const char *dir,
const char *name);
virNWFilterDefPtr virNWFilterDefParseString(virConnectPtr conn,
const char *xml);
virNWFilterDefPtr virNWFilterDefParseFile(virConnectPtr conn,
const char *filename);
virNWFilterDefPtr virNWFilterDefParseString(const char *xml);
virNWFilterDefPtr virNWFilterDefParseFile(const char *filename);
void virNWFilterObjLock(virNWFilterObjPtr obj);
void virNWFilterObjUnlock(virNWFilterObjPtr obj);
......
......@@ -540,7 +540,7 @@ nwfilterDefine(virConnectPtr conn,
nwfilterDriverLock(driver);
virNWFilterCallbackDriversLock();
if (!(def = virNWFilterDefParseString(conn, xml)))
if (!(def = virNWFilterDefParseString(xml)))
goto cleanup;
if (!(nwfilter = virNWFilterObjAssignDef(conn, &driver->nwfilters, def)))
......
......@@ -33,7 +33,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
virResetLastError();
if (!(dev = virNWFilterDefParseString(NULL, inXmlData))) {
if (!(dev = virNWFilterDefParseString(inXmlData))) {
if (expect_error) {
virResetLastError();
goto done;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册