Skip to content

Commit

Permalink
test: ensure we write something during litest_sendfile
Browse files Browse the repository at this point in the history
This mostly shuts up coverity about potentially using a negative size to
write.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
whot committed Aug 9, 2018
1 parent 3b6cb47 commit f2d1b34
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/litest.h
Expand Up @@ -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);
}

Expand Down

0 comments on commit f2d1b34

Please sign in to comment.