On a Tuesday in 2023, Michal Privoznik wrote:
The virXMLParseHelper() can work in two modes: either it parses a
file or a string. Either way, the same set of flags is specified
in call of corresponding function. Save flags in a local variable
instead.

Signed-off-by: Michal Privoznik <[email protected]>
---
src/util/virxml.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/util/virxml.c b/src/util/virxml.c
index 4f215a0e59..31685cddde 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -1136,6 +1136,8 @@ virXMLParseHelper(int domcode,
    g_autoptr(xmlDoc) xml = NULL;
    xmlNodePtr rootnode;
    const char *docname;
+    const int parseFlags = XML_PARSE_NONET |
+        XML_PARSE_NOWARNING;

This can fit on a single line.


    if (filename)
        docname = filename;

Reviewed-by: Ján Tomko <[email protected]>

Jano

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to