mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
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:
parent
609eb987c6
commit
b77b16ce41
@ -2634,8 +2634,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;
|
||||||
@ -2650,18 +2649,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3056,7 +3053,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -713,10 +713,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);
|
||||||
|
@ -566,7 +566,7 @@ nwfilterDefineXML(virConnectPtr conn,
|
|||||||
nwfilterDriverLock(driver);
|
nwfilterDriverLock(driver);
|
||||||
virNWFilterCallbackDriversLock();
|
virNWFilterCallbackDriversLock();
|
||||||
|
|
||||||
if (!(def = virNWFilterDefParseString(conn, xml)))
|
if (!(def = virNWFilterDefParseString(xml)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virNWFilterDefineXMLEnsureACL(conn, def) < 0)
|
if (virNWFilterDefineXMLEnsureACL(conn, def) < 0)
|
||||||
|
@ -36,7 +36,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
|
|||||||
|
|
||||||
virResetLastError();
|
virResetLastError();
|
||||||
|
|
||||||
if (!(dev = virNWFilterDefParseString(NULL, inXmlData))) {
|
if (!(dev = virNWFilterDefParseString(inXmlData))) {
|
||||||
if (expect_error) {
|
if (expect_error) {
|
||||||
virResetLastError();
|
virResetLastError();
|
||||||
goto done;
|
goto done;
|
||||||
|
Loading…
Reference in New Issue
Block a user