[libxml2] Fix a wrong test



commit ccc9cf9276d9f603f01302da885155556d236b56
Author: Daniel Veillard <veillard redhat com>
Date:   Mon Jul 22 14:24:16 2013 +0800

    Fix a wrong test
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704530
    
    Arg is an array on the stack and can't be NULL

 debugXML.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/debugXML.c b/debugXML.c
index c8efe6a..3c13783 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -2946,7 +2946,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
         } else if (!strcmp(command, "save")) {
             xmlShellSave(ctxt, arg, NULL, NULL);
         } else if (!strcmp(command, "write")) {
-           if ((arg == NULL) || (arg[0] == 0))
+           if (arg[0] == 0)
                xmlGenericError(xmlGenericErrorContext,
                         "Write command requires a filename argument\n");
            else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]