From afb9ea93adb5805b580c343bd81cc168697d1d63 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 6 Oct 2010 23:25:35 -0700 Subject: Silencing some (mostly whiny) compiler warnings. --- lib/xmltree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/xmltree.c') diff --git a/lib/xmltree.c b/lib/xmltree.c index bee9007f..54a7dd13 100644 --- a/lib/xmltree.c +++ b/lib/xmltree.c @@ -614,7 +614,10 @@ void xt_add_child( struct xt_node *parent, struct xt_node *child ) /* Same, but at the beginning. */ void xt_insert_child( struct xt_node *parent, struct xt_node *child ) { - struct xt_node *node, *last; + struct xt_node *node, *last = NULL; + + if( child == NULL ) + return; /* BUG */ for( node = child; node; node = node->next ) { -- cgit v1.2.3