Skip to contentSkip to conversation

Staging: xgifb: Fix NULL pointer comparison warning

PATCH New Maninder Singh 1 participant 1 message Oct 20, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: xgifb: Fix NULL pointer comparison warning

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

---
 drivers/staging/xgifb/XGI_main_26.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/xgifb/XGI_main_26.c +2 -2
index 0c78491..89bd4dd 100644
@@ -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) {
Signature · 1 line
1.7.9.5