diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-04-28 05:14:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:33 -0400 |
commit | 2f9e9b6db31d96fe4e8b519b8aab1ba172dd3ddf (patch) | |
tree | 37a266621d7434479b359c1417a871e54289e173 /drivers/isdn/capi/capidrv.c | |
parent | 50f8c370e77befe9121720bd7bdada2ac0d13915 (diff) |
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 <harvey.harrison@gmail.com>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn/capi/capidrv.c')
-rw-r--r-- | drivers/isdn/capi/capidrv.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c index cb42b690b45e..2e602dd07ffa 100644 --- a/drivers/isdn/capi/capidrv.c +++ b/drivers/isdn/capi/capidrv.c | |||
@@ -335,7 +335,7 @@ static capidrv_plci *new_plci(capidrv_contr * card, int chan) | |||
335 | 335 | ||
336 | plcip = kzalloc(sizeof(capidrv_plci), GFP_ATOMIC); | 336 | plcip = kzalloc(sizeof(capidrv_plci), GFP_ATOMIC); |
337 | 337 | ||
338 | if (plcip == 0) | 338 | if (plcip == NULL) |
339 | return NULL; | 339 | return NULL; |
340 | 340 | ||
341 | plcip->state = ST_PLCI_NONE; | 341 | plcip->state = ST_PLCI_NONE; |
@@ -404,7 +404,7 @@ static inline capidrv_ncci *new_ncci(capidrv_contr * card, | |||
404 | 404 | ||
405 | nccip = kzalloc(sizeof(capidrv_ncci), GFP_ATOMIC); | 405 | nccip = kzalloc(sizeof(capidrv_ncci), GFP_ATOMIC); |
406 | 406 | ||
407 | if (nccip == 0) | 407 | if (nccip == NULL) |
408 | return NULL; | 408 | return NULL; |
409 | 409 | ||
410 | nccip->ncci = ncci; | 410 | nccip->ncci = ncci; |
@@ -426,7 +426,7 @@ static inline capidrv_ncci *find_ncci(capidrv_contr * card, u32 ncci) | |||
426 | capidrv_plci *plcip; | 426 | capidrv_plci *plcip; |
427 | capidrv_ncci *p; | 427 | capidrv_ncci *p; |
428 | 428 | ||
429 | if ((plcip = find_plci_by_ncci(card, ncci)) == 0) | 429 | if ((plcip = find_plci_by_ncci(card, ncci)) == NULL) |
430 | return NULL; | 430 | return NULL; |
431 | 431 | ||
432 | for (p = plcip->ncci_list; p; p = p->next) | 432 | for (p = plcip->ncci_list; p; p = p->next) |
@@ -441,7 +441,7 @@ static inline capidrv_ncci *find_ncci_by_msgid(capidrv_contr * card, | |||
441 | capidrv_plci *plcip; | 441 | capidrv_plci *plcip; |
442 | capidrv_ncci *p; | 442 | capidrv_ncci *p; |
443 | 443 | ||
444 | if ((plcip = find_plci_by_ncci(card, ncci)) == 0) | 444 | if ((plcip = find_plci_by_ncci(card, ncci)) == NULL) |
445 | return NULL; | 445 | return NULL; |
446 | 446 | ||
447 | for (p = plcip->ncci_list; p; p = p->next) | 447 | for (p = plcip->ncci_list; p; p = p->next) |
@@ -755,7 +755,7 @@ static inline int new_bchan(capidrv_contr * card) | |||
755 | { | 755 | { |
756 | int i; | 756 | int i; |
757 | for (i = 0; i < card->nbchan; i++) { | 757 | for (i = 0; i < card->nbchan; i++) { |
758 | if (card->bchans[i].plcip == 0) { | 758 | if (card->bchans[i].plcip == NULL) { |
759 | card->bchans[i].disconnecting = 0; | 759 | card->bchans[i].disconnecting = 0; |
760 | return i; | 760 | return i; |
761 | } | 761 | } |
@@ -877,7 +877,7 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg) | |||
877 | return; | 877 | return; |
878 | } | 878 | } |
879 | bchan = &card->bchans[chan]; | 879 | bchan = &card->bchans[chan]; |
880 | if ((plcip = new_plci(card, chan)) == 0) { | 880 | if ((plcip = new_plci(card, chan)) == NULL) { |
881 | printk(KERN_ERR "capidrv-%d: incoming call: no memory, sorry.\n", card->contrnr); | 881 | printk(KERN_ERR "capidrv-%d: incoming call: no memory, sorry.\n", card->contrnr); |
882 | return; | 882 | return; |
883 | } | 883 | } |
@@ -1661,7 +1661,7 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card) | |||
1661 | NULL, /* Useruserdata */ | 1661 | NULL, /* Useruserdata */ |
1662 | NULL /* Facilitydataarray */ | 1662 | NULL /* Facilitydataarray */ |
1663 | ); | 1663 | ); |
1664 | if ((plcip = new_plci(card, (c->arg % card->nbchan))) == 0) { | 1664 | if ((plcip = new_plci(card, (c->arg % card->nbchan))) == NULL) { |
1665 | cmd.command = ISDN_STAT_DHUP; | 1665 | cmd.command = ISDN_STAT_DHUP; |
1666 | cmd.driver = card->myid; | 1666 | cmd.driver = card->myid; |
1667 | cmd.arg = (c->arg % card->nbchan); | 1667 | cmd.arg = (c->arg % card->nbchan); |
@@ -1966,7 +1966,7 @@ static void enable_dchannel_trace(capidrv_contr *card) | |||
1966 | card->name, errcode); | 1966 | card->name, errcode); |
1967 | return; | 1967 | return; |
1968 | } | 1968 | } |
1969 | if (strstr(manufacturer, "AVM") == 0) { | 1969 | if (strstr(manufacturer, "AVM") == NULL) { |
1970 | printk(KERN_ERR "%s: not from AVM, no d-channel trace possible (%s)\n", | 1970 | printk(KERN_ERR "%s: not from AVM, no d-channel trace possible (%s)\n", |
1971 | card->name, manufacturer); | 1971 | card->name, manufacturer); |
1972 | return; | 1972 | return; |
@@ -2291,10 +2291,10 @@ static int __init capidrv_init(void) | |||
2291 | u32 ncontr, contr; | 2291 | u32 ncontr, contr; |
2292 | u16 errcode; | 2292 | u16 errcode; |
2293 | 2293 | ||
2294 | if ((p = strchr(revision, ':')) != 0 && p[1]) { | 2294 | if ((p = strchr(revision, ':')) != NULL && p[1]) { |
2295 | strncpy(rev, p + 2, sizeof(rev)); | 2295 | strncpy(rev, p + 2, sizeof(rev)); |
2296 | rev[sizeof(rev)-1] = 0; | 2296 | rev[sizeof(rev)-1] = 0; |
2297 | if ((p = strchr(rev, '$')) != 0 && p > rev) | 2297 | if ((p = strchr(rev, '$')) != NULL && p > rev) |
2298 | *(p-1) = 0; | 2298 | *(p-1) = 0; |
2299 | } else | 2299 | } else |
2300 | strcpy(rev, "1.0"); | 2300 | strcpy(rev, "1.0"); |
@@ -2335,10 +2335,10 @@ static void __exit capidrv_exit(void) | |||
2335 | char rev[32]; | 2335 | char rev[32]; |
2336 | char *p; | 2336 | char *p; |
2337 | 2337 | ||
2338 | if ((p = strchr(revision, ':')) != 0) { | 2338 | if ((p = strchr(revision, ':')) != NULL) { |
2339 | strncpy(rev, p + 1, sizeof(rev)); | 2339 | strncpy(rev, p + 1, sizeof(rev)); |
2340 | rev[sizeof(rev)-1] = 0; | 2340 | rev[sizeof(rev)-1] = 0; |
2341 | if ((p = strchr(rev, '$')) != 0) | 2341 | if ((p = strchr(rev, '$')) != NULL) |
2342 | *p = 0; | 2342 | *p = 0; |
2343 | } else { | 2343 | } else { |
2344 | strcpy(rev, " ??? "); | 2344 | strcpy(rev, " ??? "); |