yaz/yaz-codecleanup.44.diff

27 lines
789 B
Diff
Raw Normal View History

--- yaz-2.1.44/util/yaz-xmlquery.c.~1~ 2007-01-09 17:17:12.000000000 +0100
+++ yaz-2.1.44/util/yaz-xmlquery.c 2007-01-09 17:27:26.000000000 +0100
@@ -62,19 +62,19 @@
}
else
{
- xmlChar *buf_out = 0;
+ union { char *cp; xmlChar *xmlp; }buf_out = { NULL };
int len_out = 0;
- xmlDocDumpMemory(doc, &buf_out, &len_out);
+ xmlDocDumpMemory(doc, &buf_out.xmlp, &len_out);
- if (!len_out || !buf_out)
+ if (!len_out || !buf_out.cp)
{
fprintf(stderr, "%s: xmlDocDumpMemory failed for query %s\n",
prog, pqf);
exit(4);
}
else
- fwrite(buf_out, len_out, 1, stdout);
+ fwrite(buf_out.cp, len_out, 1, stdout);
xmlFreeDoc(doc);
}
}