summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 195835425d..c07c569c26 100644
--- a/src/util.c
+++ b/src/util.c
@@ -2885,7 +2885,8 @@ ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll) {
while (nbytes > 0) {
ssize_t k;
- if ((k = write(fd, p, nbytes)) <= 0) {
+ k = write(fd, p, nbytes);
+ if (k <= 0) {
if (k < 0 && errno == EINTR)
continue;