yaz/yaz-codecleanup.44.diff

31 lines
980 B
Diff
Raw Normal View History

diff -u /usr/src/ke/yaz/yaz-3.0.44/util/yaz-xmlquery.c\~ /usr/src/ke/yaz/yaz-3.0.44/util/yaz-xmlquery.c
--- yaz-3.0.44/util/yaz-xmlquery.c~ 2009-01-15 13:28:38.000000000 +0100
+++ yaz-3.0.44/util/yaz-xmlquery.c 2009-03-05 16:18:40.000000000 +0100
@@ -60,12 +60,12 @@
}
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);
@@ -73,7 +73,7 @@
}
else
{
- if (fwrite(buf_out, len_out, 1, stdout) != 1)
+ if (fwrite(buf_out.cp, len_out, 1, stdout) != 1)
{
fprintf(stderr, "%s: write failed\n", prog);
exit(5);
Diff finished. Thu Mar 5 16:19:08 2009