conf: nwfilterbinding: Provide only virNWFilterBindingDefParse

Remove the virNWFilterBindingDefParseString/File thin wrappers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-09-22 15:56:32 +02:00
parent 3eb151ddfd
commit 0dceac9b8e
5 changed files with 7 additions and 25 deletions

View File

@ -154,7 +154,7 @@ virNWFilterBindingDefParseXML(xmlXPathContextPtr ctxt)
}
static virNWFilterBindingDef *
virNWFilterBindingDef *
virNWFilterBindingDefParse(const char *xmlStr,
const char *filename,
unsigned int flags)
@ -171,21 +171,6 @@ virNWFilterBindingDefParse(const char *xmlStr,
}
virNWFilterBindingDef *
virNWFilterBindingDefParseString(const char *xmlStr,
unsigned int flags)
{
return virNWFilterBindingDefParse(xmlStr, NULL, flags);
}
virNWFilterBindingDef *
virNWFilterBindingDefParseFile(const char *filename)
{
return virNWFilterBindingDefParse(NULL, filename, 0);
}
char *
virNWFilterBindingDefFormat(const virNWFilterBindingDef *def)
{

View File

@ -50,12 +50,10 @@ virNWFilterBindingDef *
virNWFilterBindingDefParseXML(xmlXPathContextPtr ctxt);
virNWFilterBindingDef *
virNWFilterBindingDefParseString(const char *xml,
virNWFilterBindingDefParse(const char *xmlStr,
const char *filename,
unsigned int flags);
virNWFilterBindingDef *
virNWFilterBindingDefParseFile(const char *filename);
char *
virNWFilterBindingDefFormat(const virNWFilterBindingDef *def);

View File

@ -1364,8 +1364,7 @@ virNWFilterBindingDefCopy;
virNWFilterBindingDefFormat;
virNWFilterBindingDefFormatBuf;
virNWFilterBindingDefFree;
virNWFilterBindingDefParseFile;
virNWFilterBindingDefParseString;
virNWFilterBindingDefParse;
virNWFilterBindingDefParseXML;

View File

@ -739,7 +739,7 @@ nwfilterBindingCreateXML(virConnectPtr conn,
return NULL;
}
def = virNWFilterBindingDefParseString(xml, flags);
def = virNWFilterBindingDefParse(xml, NULL, flags);
if (!def)
return NULL;

View File

@ -41,7 +41,7 @@ testCompareXMLToXMLFiles(const char *xml)
virResetLastError();
if (!(dev = virNWFilterBindingDefParseFile(xml)))
if (!(dev = virNWFilterBindingDefParse(NULL, xml, 0)))
goto fail;
if (!(actual = virNWFilterBindingDefFormat(dev)))