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/hsomodem | |
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/hsomodem')
-rw-r--r-- | drivers/hsomodem/gprs-context.c | 4 | ||||
-rw-r--r-- | drivers/hsomodem/radio-settings.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hsomodem/gprs-context.c b/drivers/hsomodem/gprs-context.c index dc6f1b61..a3f55ab3 100644 --- a/drivers/hsomodem/gprs-context.c +++ b/drivers/hsomodem/gprs-context.c @@ -156,7 +156,7 @@ static void hso_gprs_activate_primary(struct ofono_gprs_context *gc, char buf[AUTH_BUF_LENGTH]; int len; - if (!cbd) + if (cbd == NULL) goto error; gcd->active_context = ctx->cid; @@ -200,7 +200,7 @@ static void hso_gprs_deactivate_primary(struct ofono_gprs_context *gc, struct cb_data *cbd = cb_data_new(cb, data); char buf[128]; - if (!cbd) + if (cbd == NULL) goto error; cbd->user = gc; diff --git a/drivers/hsomodem/radio-settings.c b/drivers/hsomodem/radio-settings.c index 3e22065c..70c0efe4 100644 --- a/drivers/hsomodem/radio-settings.c +++ b/drivers/hsomodem/radio-settings.c @@ -172,7 +172,7 @@ static int hso_radio_settings_probe(struct ofono_radio_settings *rs, struct radio_settings_data *rsd; rsd = g_try_new0(struct radio_settings_data, 1); - if (!rsd) + if (rsd == NULL) return -ENOMEM; rsd->chat = g_at_chat_clone(chat); |