mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-03 19:40:12 +01:00
test: ensure we write something during litest_sendfile
This mostly shuts up coverity about potentially using a negative size to write. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
3b6cb471d3
commit
f2d1b34808
1 changed files with 1 additions and 0 deletions
|
|
@ -1092,6 +1092,7 @@ litest_send_file(int sock, int fd)
|
|||
{
|
||||
char buf[40960];
|
||||
int n = read(fd, buf, 40960);
|
||||
litest_assert_int_gt(n, 0);
|
||||
return write(sock, buf, n);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue