X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fcacheio.c;fp=support%2Fnfs%2Fcacheio.c;h=61e07a8257c961a7815ac0ae3816352cf14cfba5;hp=e641c4535c652c803dc067e4cfe3f4633bc28b12;hb=ffe1b3f8483c96e85409e5ea5ed69ab98128a3a1;hpb=11d4f1d2feae160caa35c4eb8565c969dc16a24d 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