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>
This commit is contained in:
Daniel P. Berrange 2013-10-03 12:35:34 +01:00
parent 609eb987c6
commit b77b16ce41
4 changed files with 10 additions and 15 deletions

View File

@ -2634,8 +2634,7 @@ cleanup:
static virNWFilterDefPtr
virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED,
const char *xmlStr,
virNWFilterDefParse(const char *xmlStr,
const char *filename) {
virNWFilterDefPtr def = NULL;
xmlDocPtr xml;
@ -2650,18 +2649,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);
}
@ -3056,7 +3053,7 @@ virNWFilterObjLoad(virConnectPtr conn,
virNWFilterDefPtr def;
virNWFilterObjPtr nwfilter;
if (!(def = virNWFilterDefParseFile(conn, path))) {
if (!(def = virNWFilterDefParseFile(path))) {
return NULL;
}

View File

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

View File

@ -566,7 +566,7 @@ nwfilterDefineXML(virConnectPtr conn,
nwfilterDriverLock(driver);
virNWFilterCallbackDriversLock();
if (!(def = virNWFilterDefParseString(conn, xml)))
if (!(def = virNWFilterDefParseString(xml)))
goto cleanup;
if (virNWFilterDefineXMLEnsureACL(conn, def) < 0)

View File

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