From c718ffba43bc5a4c839db465e6d73c69c58bed84 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 3 Oct 2013 12:35:34 +0100 Subject: [PATCH] Remove virConnectPtr arg from virNWFilterDefParse* None of the virNWFilterDefParse* methods require a virConnectPtr arg, so just drop it Signed-off-by: Daniel P. Berrange (cherry picked from commit b77b16ce4166dcc87963ae5d279b77b162ddbb55) --- 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 3456b7790c..c009921b42 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -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; } diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index 5d04cff890..faa752707a 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 1ed28a2ac2..c2afdfc812 100644 --- a/src/nwfilter/nwfilter_driver.c +++ b/src/nwfilter/nwfilter_driver.c @@ -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) diff --git a/tests/nwfilterxml2xmltest.c b/tests/nwfilterxml2xmltest.c index 84e61da1b1..14191a676a 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))) { if (expect_error) { virResetLastError(); goto done; -- GitLab