summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/stdio/fflush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c
index a61f5323..19096714 100644
--- a/src/stdio/fflush.c
+++ b/src/stdio/fflush.c
@@ -24,7 +24,7 @@ int fflush(FILE *stream)
}
flockfile(stream);
- if (write(stream->fd, stream->buf, stream->bpos) == -1) {
+ if (write(stream->fd, stream->buf, stream->bpos) < 0) {
/* errno is set */
ret = EOF;
stream->err = 1;