1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00

test: fileio - make coverity happy

Explicitly check the length of the read.

Fixes CID#1250803.
This commit is contained in:
Tom Gundersen 2014-11-04 16:19:26 +01:00
parent 7c63b23f49
commit 696c24fced

View 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);