X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fmarcdump.c;h=662445ea00c339808c5c6222a4e2f8027ada089d;hb=7ef1b50f481cda83d012cc3d69d83f9313836f1f;hp=ed2096aa838fb881ea0d9e6c5a27da208e9e9358;hpb=ee6ab2ee3a9ee1a8c65d7272ec7fba1d886f5af0;p=yaz-moved-to-github.git diff --git a/util/marcdump.c b/util/marcdump.c index ed2096a..662445e 100644 --- a/util/marcdump.c +++ b/util/marcdump.c @@ -332,7 +332,11 @@ static void dump(const char *fname, const char *from, const char *to, r = yaz_marc_decode_buf(mt, buf, -1, &result, &len_result); if (r > 0 && result) { - fwrite (result, len_result, 1, stdout); + if (fwrite(result, len_result, 1, stdout) != 1) + { + fprintf(stderr, "Write to stdout failed\n"); + break; + } } if (r > 0 && cfile) {