summaryrefslogtreecommitdiffstats
path: root/drivers/ifxmodem
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ifxmodem')
-rw-r--r--drivers/ifxmodem/audio-settings.c2
-rw-r--r--drivers/ifxmodem/gprs-context.c8
-rw-r--r--drivers/ifxmodem/radio-settings.c2
-rw-r--r--drivers/ifxmodem/stk.c6
-rw-r--r--drivers/ifxmodem/voicecall.c18
5 files changed, 18 insertions, 18 deletions
diff --git a/drivers/ifxmodem/audio-settings.c b/drivers/ifxmodem/audio-settings.c
index fd100aa3..8273335e 100644
--- a/drivers/ifxmodem/audio-settings.c
+++ b/drivers/ifxmodem/audio-settings.c
@@ -116,7 +116,7 @@ static int ifx_audio_settings_probe(struct ofono_audio_settings *as,
struct audio_settings_data *asd;
asd = g_try_new0(struct audio_settings_data, 1);
- if (!asd)
+ if (asd == NULL)
return -ENOMEM;
asd->chat = g_at_chat_clone(chat);
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);
diff --git a/drivers/ifxmodem/radio-settings.c b/drivers/ifxmodem/radio-settings.c
index 89e97e7a..2ec94f15 100644
--- a/drivers/ifxmodem/radio-settings.c
+++ b/drivers/ifxmodem/radio-settings.c
@@ -173,7 +173,7 @@ static int ifx_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);
diff --git a/drivers/ifxmodem/stk.c b/drivers/ifxmodem/stk.c
index c17a5ad7..6494c4da 100644
--- a/drivers/ifxmodem/stk.c
+++ b/drivers/ifxmodem/stk.c
@@ -104,7 +104,7 @@ static void ifx_stk_envelope(struct ofono_stk *stk, int length,
DBG("");
- if (!cbd || !buf)
+ if (cbd == NULL || buf == NULL)
goto error;
len = sprintf(buf, "AT+SATE=\"");
@@ -150,7 +150,7 @@ static void ifx_stk_terminal_response(struct ofono_stk *stk, int length,
DBG("");
- if (!cbd || !buf)
+ if (cbd == NULL || buf == NULL)
goto error;
len = sprintf(buf, "AT+SATR=\"");
@@ -273,7 +273,7 @@ static int ifx_stk_probe(struct ofono_stk *stk, unsigned int vendor, void *data)
DBG("");
sd = g_try_new0(struct stk_data, 1);
- if (!sd)
+ if (sd == NULL)
return -ENOMEM;
sd->chat = g_at_chat_clone(chat);
diff --git a/drivers/ifxmodem/voicecall.c b/drivers/ifxmodem/voicecall.c
index 26cc7feb..4bb56816 100644
--- a/drivers/ifxmodem/voicecall.c
+++ b/drivers/ifxmodem/voicecall.c
@@ -94,7 +94,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->id = ofono_voicecall_get_next_callid(vc);
@@ -287,7 +287,7 @@ static void atd_cb(gboolean ok, GAtResult *result, gpointer user_data)
/* Generate a voice call that was just dialed, we guess the ID */
call = create_call(vc, 0, 0, 2, num, type, validity);
- if (!call) {
+ if (call == NULL) {
ofono_error("Unable to malloc, call tracking will fail!");
return;
}
@@ -311,7 +311,7 @@ static void ifx_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;
@@ -359,7 +359,7 @@ static void ifx_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;
@@ -431,7 +431,7 @@ static void ifx_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;
@@ -518,12 +518,12 @@ static void ifx_send_dtmf(struct ofono_voicecall *vc, const char *dtmf,
int i;
char *buf;
- if (!cbd)
+ if (cbd == NULL)
goto error;
/* strlen("+VTS=T\;") = 7 + initial AT + null */
buf = g_try_new(char, len * 7 + 3);
- if (!buf)
+ if (buf == NULL)
goto error;
s = sprintf(buf, "AT+VTS=%c", dtmf[0]);
@@ -689,7 +689,7 @@ static void ccwa_notify(GAtResult *result, gpointer user_data)
call = create_call(vc, class_to_call_type(cls), 1, 5,
num, num_type, validity);
- if (!call) {
+ if (call == NULL) {
ofono_error("Unable to malloc. Call management is fubar");
return;
}
@@ -723,7 +723,7 @@ static int ifx_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);