From fa5c2000f9f10198eefab3e8270221a1c778bb1d Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Thu, 21 Sep 2017 00:43:26 +0200 Subject: [PATCH] cli: use a signed type for return value read() returns ssize_t where a negative number is used for errors. The value was read into a size_t and then checked for <0. Change to ssize_t to handle the negative number. --- src/tools/pipewire-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/pipewire-cli.c b/src/tools/pipewire-cli.c index 10962ec94..b744ed282 100644 --- a/src/tools/pipewire-cli.c +++ b/src/tools/pipewire-cli.c @@ -1032,7 +1032,7 @@ static void do_input(void *data, int fd, enum spa_io mask) { struct data *d = data; char buf[4096], *error; - size_t r; + ssize_t r; if (mask & SPA_IO_IN) { while (true) {