aboutsummaryrefslogtreecommitdiffstats
path: root/debugXML.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-10-09 10:20:30 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-10-09 10:20:30 +0000
commit01992e044630e9bd74aff638e181c52fb294c266 (patch)
treebd380c79a0653bb512a253c0ef004034caa7e13b /debugXML.c
parent321be0c5bf7b74a3f5a21434ab2ad656b899bc11 (diff)
downloadandroid_external_libxml2-01992e044630e9bd74aff638e181c52fb294c266.tar.gz
android_external_libxml2-01992e044630e9bd74aff638e181c52fb294c266.tar.bz2
android_external_libxml2-01992e044630e9bd74aff638e181c52fb294c266.zip
Joe Marcus Clarke reported a segfault on FBsd this was due to
* valid.c: Joe Marcus Clarke reported a segfault on FBsd this was due to uninitialized parts of the validation context Daniel
Diffstat (limited to 'debugXML.c')
-rw-r--r--debugXML.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/debugXML.c b/debugXML.c
index fabcd128..200fe4e6 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -1355,17 +1355,23 @@ xmlShellPrintXPathError(int errorType, const char *arg)
static void
xmlShellPrintNodeCtxt(xmlShellCtxtPtr ctxt,xmlNodePtr node)
{
- if (!ctxt || !node)
+ FILE *fp;
+
+ if (!node)
return;
+ if (ctxt == NULL)
+ fp = stdout;
+ else
+ fp = ctxt->output;
if (node->type == XML_DOCUMENT_NODE)
- xmlDocDump(ctxt->output, (xmlDocPtr) node);
+ xmlDocDump(fp, (xmlDocPtr) node);
else if (node->type == XML_ATTRIBUTE_NODE)
- xmlDebugDumpAttrList(ctxt->output, (xmlAttrPtr) node, 0);
+ xmlDebugDumpAttrList(fp, (xmlAttrPtr) node, 0);
else
- xmlElemDump(ctxt->output, node->doc, node);
+ xmlElemDump(fp, node->doc, node);
- fprintf(ctxt->output, "\n");
+ fprintf(fp, "\n");
}
/**