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/ifxmodem/gprs-context.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/ifxmodem/gprs-context.c')
-rw-r--r-- | drivers/ifxmodem/gprs-context.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ifxmodem/gprs-context.c b/drivers/ifxmodem/gprs-context.c index 2a2b8df6..fcfe6989 100644 --- a/drivers/ifxmodem/gprs-context.c +++ b/drivers/ifxmodem/gprs-context.c @@ -122,7 +122,7 @@ static void failed_setup(struct ofono_gprs_context *gc, gcd->active_context = 0; gcd->state = STATE_IDLE; - if (!result) { + if (result == NULL) { CALLBACK_WITH_FAILURE(gcd->up_cb, NULL, 0, NULL, NULL, NULL, NULL, gcd->cb_data); return; @@ -154,7 +154,7 @@ static void session_cb(gboolean ok, GAtResult *result, gpointer user_data) dns[2] = 0; interface = setup_rawip(gc); - if (!interface) + if (interface == NULL) interface = "invalid"; CALLBACK_WITH_SUCCESS(gcd->up_cb, interface, TRUE, gcd->address, @@ -446,11 +446,11 @@ static int ifx_gprs_context_probe(struct ofono_gprs_context *gc, return -ENODEV; } - if (!g_at_chat_get_slave(chat)) + if (g_at_chat_get_slave(chat) == NULL) return -EINVAL; gcd = g_try_new0(struct gprs_context_data, 1); - if (!gcd) + if (gcd == NULL) return -ENOMEM; gcd->chat = g_at_chat_clone(chat); |