Staging: rtl8712: Remove zero-testing pointer typed value
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Tue, 31 Mar 2015 19:22:18 +0000 (00:52 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2015 15:26:58 +0000 (17:26 +0200)
commit5c7d08c32d0cb96ec0e831539bb68b7fe5b45973
tree33b7685e7765cb154715e1021ac96b4b1e98957e
parentb6955a8f4350686321ccc4efd2b2333d91c5c2f5
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>
drivers/staging/rtl8712/rtl871x_security.c