Thread (14 messages) 14 messages, 3 authors, 2015-03-11
STALE4151d

[PATCH 6/6] staging: sm750fb: correct integer comparison

From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date: 2015-03-10 17:17:31
Also in: lkml
Subsystem: staging - silicon motion sm750 frame buffer driver, staging subsystem, the rest · Maintainers: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman, Linus Torvalds

fixed the build warning about comparison of pointer and integer.
end of string was being compared to NULL.

Signed-off-by: Sudip Mukherjee <redacted>
---
 drivers/staging/sm750fb/sm750.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 021b863..5532a28 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -1000,7 +1000,7 @@ static void sm750fb_setup(struct lynx_share * share,char * src)
             goto NO_PARAM;
         }
 
-        while((opt = strsep(&src,":")) != NULL && *opt != NULL){
+        while((opt = strsep(&src,":")) != NULL && *opt != 0){
 			pr_err("opt=%s\n",opt);
 			pr_err("src=%s\n",src);
 
-- 
1.8.1.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help