summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2006-04-29 21:57:40 +0200
committerMike Hommey <glandium@debian.org>2006-04-29 21:57:40 +0200
commit07a67fa4bcc1b8bf2651ab41e5fc54a05059cf7e (patch)
tree7b377fd8e804a983cb2c57a43be1093ef179c5fd /example
parentc5d565931c4823dc8f62fffcb65aecfec516f7b9 (diff)
downloadlibxml2-07a67fa4bcc1b8bf2651ab41e5fc54a05059cf7e.tar.gz
Load /tmp/libxml2-2.6.24 intoupstream/2.6.24.dfsg
libxml2/branches/upstream/current.
Diffstat (limited to 'example')
-rw-r--r--example/Makefile.in10
-rw-r--r--example/gjobread.c12
2 files changed, 11 insertions, 11 deletions
diff --git a/example/Makefile.in b/example/Makefile.in
index b97da80..d1ac9ef 100644
--- a/example/Makefile.in
+++ b/example/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,8 +14,6 @@
@SET_MAKE@
-SOURCES = $(gjobread_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -59,11 +57,11 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(gjobread_SOURCES)
DIST_SOURCES = $(gjobread_SOURCES)
diff --git a/example/gjobread.c b/example/gjobread.c
index b192bf4..d3f6d57 100644
--- a/example/gjobread.c
+++ b/example/gjobread.c
@@ -237,12 +237,14 @@ parseGjobFile(char *filename) {
*/
/* First level we expect just Jobs */
cur = cur->xmlChildrenNode;
- while ( cur && xmlIsBlankNode ( cur ) )
- {
+ while ( cur && xmlIsBlankNode ( cur ) ) {
cur = cur -> next;
- }
- if ( cur == 0 )
- return ( NULL );
+ }
+ if ( cur == 0 ) {
+ xmlFreeDoc(doc);
+ free(ret);
+ return ( NULL );
+ }
if ((xmlStrcmp(cur->name, (const xmlChar *) "Jobs")) || (cur->ns != ns)) {
fprintf(stderr,"document of the wrong type, was '%s', Jobs expected",
cur->name);