From f2d1b34808b0dd5db0bf1d301cbe15cb28b4c0bd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 8 Aug 2018 20:55:58 +1000 Subject: [PATCH] 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 --- test/litest.h | 1 + 1 file changed, 1 insertion(+) diff --git a/test/litest.h b/test/litest.h index 657ef6fa2..13547f6dd 100644 --- a/test/litest.h +++ b/test/litest.h @@ -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); }