Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1504859

[PATCH] Staging: xgifb: Fix NULL pointer comparison warning

From Maninder Singh <maninder.s2@samsung.com>
Newsgroups linux.kernel
Subject [PATCH] Staging: xgifb: Fix NULL pointer comparison warning
Date 2016-10-20 14:50 +0200
Message-ID <sukXf-7Cr-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Signed-off-by: Maninder Singh <maninder.s2@samsung.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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] Staging: xgifb: Fix NULL pointer comparison warning Maninder Singh <maninder.s2@samsung.com> - 2016-10-20 14:50 +0200

csiph-web