Commit 564dfd45 authored by Thomas Wood's avatar Thomas Wood

tests/kms_fbc_crc: fix fread() return value assertion

Use 1 as the element size to check the number of bytes returned is
greater than 0, rather than checking the number of elements returned.

This fixes a regression from commit 47f6b130 (igt.cocci: check the
return values of various functions).

Bugzilla: default avatarThomas Wood <>
parent 074d8b44
......@@ -510,7 +510,7 @@ igt_main
status = igt_debugfs_fopen("i915_fbc_status", "r");
igt_require_f(status, "No i915_fbc_status found\n");
igt_assert_eq(fread(buf, sizeof(buf), 1, status), sizeof(buf));
igt_assert_lt(0, fread(buf, 1, sizeof(buf), status));
buf[sizeof(buf) - 1] = '\0';
igt_require_f(!strstr(buf, "unsupported by this chipset") &&
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment