diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2010-11-27 17:38:56 -0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-11-29 11:37:09 -0600 |
commit | b82a7f851159a42f6ca38a2357551a94a4402e11 (patch) | |
tree | 6bf00675085885091b496bf1b0ab899b9a8f79e3 /drivers/isimodem/ussd.c | |
parent | 43d2435e64e4448cbdce222c68cb1352c5c74276 (diff) | |
download | ofono-b82a7f851159a42f6ca38a2357551a94a4402e11.tar.bz2 |
drivers: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)
// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@
- !E
+ E == NULL
// </smpl>
Diffstat (limited to 'drivers/isimodem/ussd.c')
-rw-r--r-- | drivers/isimodem/ussd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/isimodem/ussd.c b/drivers/isimodem/ussd.c index 78ac9fe7..a509a0ae 100644 --- a/drivers/isimodem/ussd.c +++ b/drivers/isimodem/ussd.c @@ -181,7 +181,7 @@ static void isi_request(struct ofono_ussd *ussd, int dcs, { (uint8_t *)pdu, len } }; - if (!cbd || !ud) + if (cbd == NULL || ud == NULL) goto error; if (g_isi_vsend(ud->client, iov, 2, SS_TIMEOUT, @@ -205,7 +205,7 @@ static void isi_cancel(struct ofono_ussd *ussd, 0x00 /* subblock count */ }; - if (!cbd || !ud) + if (cbd == NULL || ud == NULL) goto error; if (g_isi_send(ud->client, msg, sizeof(msg), SS_TIMEOUT, @@ -258,11 +258,11 @@ static int isi_ussd_probe(struct ofono_ussd *ussd, unsigned int vendor, GIsiModem *idx = user; struct ussd_data *ud = g_try_new0(struct ussd_data, 1); - if (!ud) + if (ud == NULL) return -ENOMEM; ud->client = g_isi_client_create(idx, PN_SS); - if (!ud->client) + if (ud->client == NULL) return -ENOMEM; ofono_ussd_set_data(ussd, ud); @@ -275,7 +275,7 @@ static void isi_ussd_remove(struct ofono_ussd *ussd) { struct ussd_data *data = ofono_ussd_get_data(ussd); - if (!data) + if (data == NULL) return; ofono_ussd_set_data(ussd, NULL); |