diff options
Diffstat (limited to 'test/common.c')
-rw-r--r-- | test/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/common.c b/test/common.c index cb911e8..0bed3de 100644 --- a/test/common.c +++ b/test/common.c @@ -260,7 +260,7 @@ test_read_file(const char *path_rel) remaining = info.st_size; tmp = ret; - while ((count = read(fd, tmp, remaining))) { + while ((count = read(fd, tmp, remaining)) > 0) { remaining -= count; tmp += count; } |