summaryrefslogtreecommitdiffstats
path: root/drivers/stemodem/voicecall.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2010-11-27 17:38:56 -0200
committerDenis Kenzior <denkenz@gmail.com>2010-11-29 11:37:09 -0600
commitb82a7f851159a42f6ca38a2357551a94a4402e11 (patch)
tree6bf00675085885091b496bf1b0ab899b9a8f79e3 /drivers/stemodem/voicecall.c
parent43d2435e64e4448cbdce222c68cb1352c5c74276 (diff)
downloadofono-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/stemodem/voicecall.c')
-rw-r--r--drivers/stemodem/voicecall.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c
index b9d91d2e..bf68f52a 100644
--- a/drivers/stemodem/voicecall.c
+++ b/drivers/stemodem/voicecall.c
@@ -109,7 +109,7 @@ static struct ofono_call *create_call(struct ofono_voicecall *vc, int type,
/* Generate a call structure for the waiting call */
call = g_try_new0(struct ofono_call, 1);
- if (!call)
+ if (call == NULL)
return NULL;
call->type = type;
@@ -187,7 +187,7 @@ static void ste_dial(struct ofono_voicecall *vc,
struct cb_data *cbd = cb_data_new(cb, data);
char buf[256];
- if (!cbd)
+ if (cbd == NULL)
goto error;
cbd->user = vc;
@@ -235,7 +235,7 @@ static void ste_template(const char *cmd, struct ofono_voicecall *vc,
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
struct change_state_req *req = g_try_new0(struct change_state_req, 1);
- if (!req)
+ if (req == NULL)
goto error;
req->vc = vc;
@@ -299,7 +299,7 @@ static void ste_release_specific(struct ofono_voicecall *vc, int id,
struct release_id_req *req = g_try_new0(struct release_id_req, 1);
char buf[32];
- if (!req)
+ if (req == NULL)
goto error;
req->vc = vc;
@@ -379,13 +379,13 @@ static void ste_send_dtmf(struct ofono_voicecall *vc, const char *dtmf,
int s;
char *buf;
- if (!cbd)
+ if (cbd == NULL)
goto error;
/* strlen("AT+VTS=) = 7 */
buf = g_try_new(char, len + 7);
- if (!buf)
+ if (buf == NULL)
goto error;
sprintf(buf, "AT+VTS=%s", dtmf);
@@ -506,7 +506,7 @@ static void ecav_notify(GAtResult *result, gpointer user_data)
new_call = create_call(vc, call_type, direction, status,
num, num_type, clip_validity);
- if (!new_call) {
+ if (new_call == NULL) {
ofono_error("Unable to malloc. "
"Call management is fubar");
return;
@@ -546,7 +546,7 @@ static int ste_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor,
struct voicecall_data *vd;
vd = g_try_new0(struct voicecall_data, 1);
- if (!vd)
+ if (vd == NULL)
return -ENOMEM;
vd->chat = g_at_chat_clone(chat);