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.
This commit is contained in:
Thomas Hindoe Paaboel Andersen 2017-09-21 00:43:26 +02:00 committed by Wim Taymans
parent 127d69e4a0
commit fa5c2000f9

View file

@ -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) {