Remove virConnectPtr arg from virNWFilterDefParse*

None of the virNWFilterDefParse* methods require a virConnectPtr
arg, so just drop it

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit b77b16ce4166dcc87963ae5d279b77b162ddbb55)

Conflicts:
	tests/nwfilterxml2xmltest.c
This commit is contained in:
Daniel P. Berrange 2013-10-03 12:35:34 +01:00 committed by Cole Robinson
parent f22180a383
commit 3598addc9e
4 changed files with 10 additions and 15 deletions

View File

@ -2651,8 +2651,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;
@ -2667,18 +2666,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);
} }
@ -3076,7 +3073,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;
} }

View File

@ -714,10 +714,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);

View File

@ -534,7 +534,7 @@ nwfilterDefineXML(virConnectPtr conn,
nwfilterDriverLock(driver); nwfilterDriverLock(driver);
virNWFilterCallbackDriversLock(); virNWFilterCallbackDriversLock();
if (!(def = virNWFilterDefParseString(conn, xml))) if (!(def = virNWFilterDefParseString(xml)))
goto cleanup; goto cleanup;
if (!(nwfilter = virNWFilterObjAssignDef(conn, &driver->nwfilters, def))) if (!(nwfilter = virNWFilterObjAssignDef(conn, &driver->nwfilters, def)))

View File

@ -33,7 +33,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
virResetLastError(); virResetLastError();
if (!(dev = virNWFilterDefParseString(NULL, inXmlData))) if (!(dev = virNWFilterDefParseString(inXmlData)))
goto fail; goto fail;
if (!!virGetLastError() != expect_error) if (!!virGetLastError() != expect_error)