[Intel-gfx] [PATCH i-g-t 2/3] igt.cocci: don't use igt_assert_neq to compare pointers
Thomas Wood
thomas.wood at intel.com
Thu May 14 09:04:25 PDT 2015
igt_assert_neq can only compare integers, not pointers.
Signed-off-by: Thomas Wood <thomas.wood at intel.com>
---
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
More information about the Intel-gfx
mailing list