Skip to content

Commit

Permalink
network: Fix warning about signed/unsigned comparison
Browse files Browse the repository at this point in the history
Silence a warning about signed/unsigned comparison. We want a unsigned
comparison here, since we already checked that (len) was positive or
zero.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Apr 13, 2021
1 parent e65a978 commit f0b5bb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion network.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ static ssize_t network_do_splice(struct iio_device_pdata *pdata, size_t len,
err_close_pipe:
close(pipefd[0]);
close(pipefd[1]);
return ret < 0 ? ret : len;
return ret < 0 ? ret : (ssize_t)len;
}

static ssize_t network_get_buffer(const struct iio_device *dev,
Expand Down

0 comments on commit f0b5bb6

Please sign in to comment.