From 4cc637948552123652d0546d8b93cf5f17a690e0 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 29 Dec 2015 15:24:39 +0100 Subject: ... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/client.c') diff --git a/src/client.c b/src/client.c index 6b57358..6da3b39 100644 --- a/src/client.c +++ b/src/client.c @@ -102,8 +102,7 @@ send_command(enum command cmd, size_t n, const char *restrict msg) /* Send message. */ t (write(fd, &cmd_, sizeof(cmd_)) < (ssize_t)sizeof(cmd_)); while (n) { - r = write(fd, msg, n); - t (r <= 0); + t (r = write(fd, msg, n), r <= 0); msg += (size_t)r; n -= (size_t)r; } -- cgit v1.2.3-70-g09d2