From 2f9e9b6db31d96fe4e8b519b8aab1ba172dd3ddf Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Mon, 28 Apr 2008 02:14:37 -0700 Subject: capi: fix sparse warnings using integer as NULL pointer drivers/isdn/capi/kcapi.c:829:30: warning: Using plain integer as NULL pointer drivers/isdn/capi/kcapi.c:838:27: warning: Using plain integer as NULL pointer drivers/isdn/capi/kcapi.c:954:17: warning: Using plain integer as NULL pointer drivers/isdn/capi/kcapi.c:1007:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/kcapi.c:1009:33: warning: Using plain integer as NULL pointer drivers/isdn/capi/capiutil.c:453:24: warning: Using plain integer as NULL pointer drivers/isdn/capi/capilib.c:47:30: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:353:29: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:369:15: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:486:48: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:515:46: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:541:47: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:692:47: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:699:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:704:14: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:943:53: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:948:32: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:969:42: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:989:48: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:1026:69: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:1028:19: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:1061:20: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:1529:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:1531:33: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:338:15: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:758:32: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:880:40: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:407:15: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:407:15: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:444:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:1664:61: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:1969:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:2294:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:2297:33: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:2338:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:2341:33: warning: Using plain integer as NULL pointer drivers/isdn/capi/capifs.c:192:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/capifs.c:194:33: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison Cc: Karsten Keil Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/isdn/capi/kcapi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/isdn/capi/kcapi.c') diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index f5553186931..ef6de217b9f 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c @@ -826,7 +826,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data) card = capi_ctr_get(card); if (!card) return -ESRCH; - if (card->load_firmware == 0) { + if (card->load_firmware == NULL) { printk(KERN_DEBUG "kcapi: load: no load function\n"); return -ESRCH; } @@ -835,7 +835,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data) printk(KERN_DEBUG "kcapi: load: invalid parameter: length of t4file is %d ?\n", ldef.t4file.len); return -EINVAL; } - if (ldef.t4file.data == 0) { + if (ldef.t4file.data == NULL) { printk(KERN_DEBUG "kcapi: load: invalid parameter: dataptr is 0\n"); return -EINVAL; } @@ -951,7 +951,7 @@ int capi20_manufacturer(unsigned int cmd, void __user *data) if (strcmp(driver->name, cdef.driver) == 0) break; } - if (driver == 0) { + if (driver == NULL) { printk(KERN_ERR "kcapi: driver \"%s\" not loaded.\n", cdef.driver); return -ESRCH; @@ -1004,9 +1004,9 @@ static int __init kcapi_init(void) return ret; kcapi_proc_init(); - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, sizeof(rev)); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); -- cgit v1.2.3