diff options
author | Tom Gundersen <teg@jklm.no> | 2014-11-04 16:19:26 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-11-05 16:54:22 +0100 |
commit | 696c24fced77b152dda45f0bdbcf6411849bd8ab (patch) | |
tree | edbd8c239de1221bee462cd53142cc2261c9c50a /src/test | |
parent | 7c63b23f499069b7bbdf5e74d3e7a622918341e9 (diff) |
test: fileio - make coverity happy
Explicitly check the length of the read.
Fixes CID#1250803.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-fileio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c index a713abde65..c26a6facb4 100644 --- a/src/test/test-fileio.c +++ b/src/test/test-fileio.c @@ -342,7 +342,7 @@ static void test_write_string_file_no_create(void) { assert_se(write_string_file_no_create("/a/file/which/does/not/exists/i/guess", "boohoo") < 0); assert_se(write_string_file_no_create(fn, "boohoo") == 0); - assert_se(read(fd, buf, sizeof(buf))); + assert_se(read(fd, buf, sizeof(buf)) == strlen("boohoo\n")); assert_se(streq(buf, "boohoo\n")); unlink(fn); |