summaryrefslogtreecommitdiffstats
path: root/sms.c
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2013-03-31 22:46:24 +0200
committerPaul Kocialkowski <contact@paulk.fr>2013-03-31 22:48:21 +0200
commitab6eef687bc891e3e47edd43cee7e39336d30d26 (patch)
treebb61b1c5fc844cc78ec1311dc830cdb40c787229 /sms.c
parent05951ff716f62b05da40fef1aa1f82e2fa9d2601 (diff)
downloadhardware_ril_samsung-ril-ab6eef687bc891e3e47edd43cee7e39336d30d26.zip
hardware_ril_samsung-ril-ab6eef687bc891e3e47edd43cee7e39336d30d26.tar.gz
hardware_ril_samsung-ril-ab6eef687bc891e3e47edd43cee7e39336d30d26.tar.bz2
Avoid checking ipc_message_info pointer since it is checked in readloop
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'sms.c')
-rw-r--r--sms.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sms.c b/sms.c
index d13edcb..1369fc8 100644
--- a/sms.c
+++ b/sms.c
@@ -421,7 +421,7 @@ void ipc_sms_svc_center_addr(struct ipc_message_info *info)
int smsc_length;
int rc;
- if (info == NULL || info->data == NULL || info->length < sizeof(unsigned char))
+ if (info->data == NULL || info->length < sizeof(unsigned char))
goto error;
send_sms = ril_request_send_sms_info_find_token(ril_request_get_token(info->aseq));
@@ -452,8 +452,7 @@ void ipc_sms_svc_center_addr(struct ipc_message_info *info)
return;
error:
- if (info != NULL)
- ril_request_complete(ril_request_get_token(info->aseq), RIL_E_GENERIC_FAILURE, NULL, 0);
+ ril_request_complete(ril_request_get_token(info->aseq), RIL_E_GENERIC_FAILURE, NULL, 0);
}
void ipc_sms_send_msg_complete(struct ipc_message_info *info)
@@ -477,7 +476,7 @@ void ipc_sms_send_msg(struct ipc_message_info *info)
RIL_SMS_Response response;
RIL_Errno e;
- if (info == NULL || info->data == NULL || info->length < sizeof(struct ipc_sms_send_msg_response))
+ if (info->data == NULL || info->length < sizeof(struct ipc_sms_send_msg_response))
goto error;
report_msg = (struct ipc_sms_send_msg_response *) info->data;
@@ -498,8 +497,7 @@ void ipc_sms_send_msg(struct ipc_message_info *info)
return;
error:
- if (info != NULL)
- ril_request_complete(ril_request_get_token(info->aseq), RIL_E_GENERIC_FAILURE, NULL, 0);
+ ril_request_complete(ril_request_get_token(info->aseq), RIL_E_GENERIC_FAILURE, NULL, 0);
}
/*
@@ -618,7 +616,7 @@ void ipc_sms_incoming_msg(struct ipc_message_info *info)
int length;
int rc;
- if (info == NULL || info->data == NULL || info->length < sizeof(struct ipc_sms_incoming_msg))
+ if (info->data == NULL || info->length < sizeof(struct ipc_sms_incoming_msg))
goto error;
msg = (struct ipc_sms_incoming_msg *) info->data;
@@ -688,7 +686,7 @@ void ipc_sms_deliver_report(struct ipc_message_info *info)
RIL_Errno e;
int error_code;
- if (info == NULL || info->data == NULL || info->length < sizeof(struct ipc_sms_deliver_report_response))
+ if (info->data == NULL || info->length < sizeof(struct ipc_sms_deliver_report_response))
goto error;
report_msg = (struct ipc_sms_deliver_report_response *) info->data;