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