summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-09-16 21:59:50 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-09-16 22:02:23 +0200
commitcca0efb0477f9bb7d61b48ba270b885b29c0bb72 (patch)
tree7e1f60219383326789150b796f78d196ae5a66b3
parentd9ab174bd7ec1dd5b382d3d84737d1c9ed1f4481 (diff)
test: silence a coverity report
We check the actual contents of the file on the line after but we might as well also check the number of bytes read here. Found by coverity. Fixes: CID#1237521
-rw-r--r--src/test/test-fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
index e69706c3f8..92aa794a95 100644
--- a/src/test/test-fileio.c
+++ b/src/test/test-fileio.c
@@ -325,7 +325,7 @@ static void test_write_string_file(void) {
assert_se(write_string_file(fn, "boohoo") == 0);
- assert_se(read(fd, buf, sizeof(buf)));
+ assert_se(read(fd, buf, sizeof(buf)) == 7);
assert_se(streq(buf, "boohoo\n"));
unlink(fn);