projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes for gcc warnings - mostly WRT check of returns values
[yaz-moved-to-github.git]
/
util
/
srwtst.c
diff --git
a/util/srwtst.c
b/util/srwtst.c
index
7de077c
..
9208cd6
100644
(file)
--- a/
util/srwtst.c
+++ b/
util/srwtst.c
@@
-74,8
+74,11
@@
int main(int argc, char **argv)
{
fprintf (stderr, "%d\n", i);
if (res->records[i].recordData_buf)
{
fprintf (stderr, "%d\n", i);
if (res->records[i].recordData_buf)
- fwrite(res->records[i].recordData_buf, 1,
- res->records[i].recordData_len, stderr);
+ {
+ fprintf(stderr, "%.*s",
+ res->records[i].recordData_len,
+ res->records[i].recordData_buf);
+ }
}
}
}
}
}
}
@@
-85,7
+88,9
@@
int main(int argc, char **argv)
ret = z_soap_codec(encode, &soap_package,
&content_buf, &content_len, h);
if (content_buf && content_len)
ret = z_soap_codec(encode, &soap_package,
&content_buf, &content_len, h);
if (content_buf && content_len)
- fwrite (content_buf, content_len, 1, stdout);
+ {
+ printf("%.*s", content_len, content_buf);
+ }
else
{
fprintf(stderr, "No output!\n");
else
{
fprintf(stderr, "No output!\n");