chiark / gitweb /
test: fileio - make coverity happy
[elogind.git] / src / test / test-fileio.c
index a713abde65000dc8fe9e8eadf38b876d5a4cb814..c26a6facb43e4aa7509b853424db2ef46c973705 100644 (file)
@@ -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);