X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fcacheio.c;h=61e07a8257c961a7815ac0ae3816352cf14cfba5;hp=e641c4535c652c803dc067e4cfe3f4633bc28b12;hb=6eba4e22ce2b10bcfb19fbb253f7e235afbaa406;hpb=7df8ca883bfd668eb559ea1b8da7c7b6e41d5b1a diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c index e641c45..61e07a8 100644 --- a/support/nfs/cacheio.c +++ b/support/nfs/cacheio.c @@ -162,11 +162,16 @@ int qword_eol(FILE *f) { int err; - fprintf(f,"\n"); - err = fflush(f); - if (err) { - xlog_warn("qword_eol: fflush failed: errno %d (%s)", + err = fprintf(f,"\n"); + if (err < 0) { + xlog_warn("qword_eol: fprintf failed: errno %d (%s)", errno, strerror(errno)); + } else { + err = fflush(f); + if (err) { + xlog_warn("qword_eol: fflush failed: errno %d (%s)", + errno, strerror(errno)); + } } /* * We must send one line (and one line only) in a single write