From: Adam Dickmeiss Date: Mon, 30 Jan 2006 16:58:06 +0000 (+0000) Subject: Avoid mixed stmt/var declare X-Git-Tag: YAZ.2.1.12~11 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=dcc6cbe2a1c328c1d59f7ff350e7cd9e8a3b5a85;p=yaz-moved-to-github.git Avoid mixed stmt/var declare --- diff --git a/test/tstsoap1.c b/test/tstsoap1.c index 85a9177..7da6967 100644 --- a/test/tstsoap1.c +++ b/test/tstsoap1.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: tstsoap1.c,v 1.5 2006-01-29 21:59:13 adam Exp $ + * $Id: tstsoap1.c,v 1.6 2006-01-30 16:58:06 adam Exp $ */ #include @@ -16,14 +16,17 @@ void tst() #if HAVE_XML2 xmlChar *buf_out; int len_out; - xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0"); - YAZ_CHECK(doc); + xmlDocPtr doc; + xmlNodePtr top; #if 0 const char *val = "jordbær"; /* makes xmlDocDumpMemory hang .. */ #else const char *val = "jordbaer"; /* OK */ #endif - xmlNodePtr top = xmlNewNode(0, BAD_CAST "top"); + doc = xmlNewDoc(BAD_CAST "1.0"); + YAZ_CHECK(doc); + + top = xmlNewNode(0, BAD_CAST "top"); YAZ_CHECK(top); xmlNewTextChild(top, 0, BAD_CAST "sub", BAD_CAST val);