lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 20 Oct 2016 18:17:03 +0530
From:   Maninder Singh <maninder.s2@...sung.com>
To:     Arnaud Patard <arnaud.patard@...-net.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Rehas Sachdeva <aquannie@...il.com>,
        Bhumika Goyal <bhumirks@...il.com>,
        Benoit Hiller <benoit.hiller@...il.com>,
        Namrata A Shettar <namrataashettar@...il.com>,
        Janani Ravichandran <janani.rvchndrn@...il.com>,
        Clifton Barnes <clifton.a.barnes@...il.com>,
        Geliang Tang <geliangtang@....com>,
        BenMarsh <bmarsh94@...il.com>
Cc:     devel@...verdev.osuosl.org,
        Ravikant Bijendra Sharma <ravikant.s2@...sung.com>,
        Maninder Singh <maninder.s2@...sung.com>,
        linux-kernel@...r.kernel.org, vidushi.koul@...sung.com
Subject: [PATCH] Staging: xgifb: Fix NULL pointer comparison warning

Replace direct comparisons to NULL i.e.
'x == NULL' with '!x'.
This problem was detected by checkpatch.

Signed-off-by: Maninder Singh <maninder.s2@...sung.com>
---
 drivers/staging/xgifb/XGI_main_26.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 0c78491..89bd4dd 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -518,7 +518,7 @@ static void XGIfb_search_crt2type(const char *name)
 {
 	int i = 0;
 
-	if (name == NULL)
+	if (!name)
 		return;
 
 	while (XGI_crt2type[i].type_no != -1) {
@@ -589,7 +589,7 @@ static void XGIfb_search_tvstd(const char *name)
 {
 	int i = 0;
 
-	if (name == NULL)
+	if (!name)
 		return;
 
 	while (XGI_tvtype[i].type_no != -1) {
-- 
1.7.9.5

Powered by blists - more mailing lists