]>
git.karo-electronics.de Git - linux-beck.git/commit
Staging: rtl8712: Remove zero-testing pointer typed value
Removes variable comparison with 0 by using !. Done using following
coccinelle script.
@ disable is_zero,isnt_zero @
expression *E;
expression E1,f;
@@
E = f(...)
<...
(
- E == 0
+ !E
|
- E != 0
+ E
|
- 0 == E
+ !E
|
- 0 != E
+ E
)
...>
?E = E1
@ disable is_zero,isnt_zero @
expression *E;
@@
(
E ==
- 0
+ NULL
|
E !=
- 0
+ NULL
|
- 0
+ NULL
== E
|
- 0
+ NULL
!= E
)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>