From 0b70693af3d91a1390c314fc84d7062ce419808b Mon Sep 17 00:00:00 2001
Message-Id: <0b70693af3d91a1390c314fc84d7062ce419808b.1381871411.git.jdenemar@redhat.com>
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Mon, 7 Oct 2013 16:43:10 +0100
Subject: [PATCH] Remove virConnectPtr arg from virNWFilterDefParse*
https://bugzilla.redhat.com/show_bug.cgi?id=1015108
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
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
src/conf/nwfilter_conf.c | 15 ++++++---------
src/conf/nwfilter_conf.h | 6 ++----
src/nwfilter/nwfilter_driver.c | 2 +-
tests/nwfilterxml2xmltest.c | 2 +-
4 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index a3901d3..54a492d 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -2633,8 +2633,7 @@ cleanup:
static virNWFilterDefPtr
-virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED,
- const char *xmlStr,
+virNWFilterDefParse(const char *xmlStr,
const char *filename) {
virNWFilterDefPtr def = NULL;
xmlDocPtr xml;
@@ -2649,18 +2648,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);
}
@@ -3055,7 +3052,7 @@ virNWFilterObjLoad(virConnectPtr conn,
virNWFilterDefPtr def;
virNWFilterObjPtr nwfilter;
- if (!(def = virNWFilterDefParseFile(conn, path))) {
+ if (!(def = virNWFilterDefParseFile(path))) {
return NULL;
}
diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h
index 5d04cff..faa7527 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -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);
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index 9bb4b4e..2cae0d0 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -561,7 +561,7 @@ nwfilterDefineXML(virConnectPtr conn,
nwfilterDriverLock(driver);
virNWFilterCallbackDriversLock();
- if (!(def = virNWFilterDefParseString(conn, xml)))
+ if (!(def = virNWFilterDefParseString(xml)))
goto cleanup;
if (virNWFilterDefineXMLEnsureACL(conn, def) < 0)
diff --git a/tests/nwfilterxml2xmltest.c b/tests/nwfilterxml2xmltest.c
index 5476284..68f74cc 100644
--- a/tests/nwfilterxml2xmltest.c
+++ b/tests/nwfilterxml2xmltest.c
@@ -36,7 +36,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
virResetLastError();
- if (!(dev = virNWFilterDefParseString(NULL, inXmlData)))
+ if (!(dev = virNWFilterDefParseString(inXmlData)))
goto fail;
if (!!virGetLastError() != expect_error)
--
1.8.3.2