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:
Peter Hutterer 2018-08-08 20:55:58 +10:00
parent 3b6cb471d3
commit f2d1b34808

View file

@ -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);
}