spatch for trivial pointer comparison style?
From: Joe Perches
Date: Thu Nov 13 2014 - 14:55:35 EST
I added a checkpatch entry for this.
Maybe some cocci test like this would be useful?
@@
type t;
t *p;
@@
- p == NULL
+ !p
@@
type t;
t *p;
@@
- p != NULL
+ p
@@
type t;
t *p;
@@
- NULL == p
+ !p
@@
type t;
t *p;
@@
- NULL != p
+ p
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/