igt_assert_neq can only compare integers, not pointers.

Signed-off-by: Thomas Wood <[email protected]>
---
 lib/igt.cocci     | 2 +-
 tests/prime_udl.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/igt.cocci b/lib/igt.cocci
index f23b511..3aee72f 100644
--- a/lib/igt.cocci
+++ b/lib/igt.cocci
@@ -193,7 +193,7 @@ expression ptr, size, nmemb, stream;
 expression list E;
 @@
 -fgets(E);
-+igt_assert_neq(fgets(E), NULL);
++igt_assert(fgets(E) != NULL);
 
 @@
 identifier func =~ "^v?asprintf$";
diff --git a/tests/prime_udl.c b/tests/prime_udl.c
index d03aee0..b742f1c 100644
--- a/tests/prime_udl.c
+++ b/tests/prime_udl.c
@@ -61,7 +61,7 @@ static int find_and_open_devices(void)
                if (!fl)
                        break;
 
-               igt_assert_neq(fgets(vendor_id, 8, fl), NULL);
+               igt_assert(fgets(vendor_id, 8, fl) != NULL);
                fclose(fl);
 
                venid = strtoul(vendor_id, NULL, 16);
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to