if (g_isi_sb_iter_get_id(&iter) != SS_GSM_FORWARDING_FEATURE)
continue;
- if (!g_isi_sb_iter_get_struct(&iter, (void *)&info, len, 2))
+ if (!g_isi_sb_iter_get_struct(&iter, (void *) &info, len, 2))
return FALSE;
if (info->numlen != 0) {
if (ucs2 == NULL)
goto error;
- memcpy((char *)msg + 13, ucs2, strlen(number->number) * 2);
+ memcpy((char *) &msg[13], ucs2, strlen(number->number) * 2);
g_free(ucs2);
if (g_isi_client_send(fd->client, msg, 7 + msg[8], SS_TIMEOUT,
uint8_t i;
if (!g_isi_sb_iter_get_byte(iter, &num, 2) ||
- !g_isi_sb_iter_get_struct(iter, (void **)&bsc, num, 3))
+ !g_isi_sb_iter_get_struct(iter, (void **) &bsc, num, 3))
return FALSE;
for (i = 0; i < num; i++)
if (g_isi_sb_iter_get_id(&iter) != SMS_GSM_CB_MESSAGE)
continue;
- if (!g_isi_sb_iter_get_struct(&iter, (void *)&info, len, 2))
+ if (!g_isi_sb_iter_get_struct(&iter, (void *) &info, len, 2))
return;
ofono_cbs_notify(cbs, info->pdu, len);
ascii[k++] = g_ascii_isgraph(m[i]) ? m[i] : '.';
if ((j & 48) == 48) {
- ofono_debug(" *%-48s : %.*s", hex, (int)k, ascii);
+ ofono_debug(" *%-48s : %.*s", hex, (int) k, ascii);
j = 0, k = 0;
}
}
if (j)
- ofono_debug(" *%-48s : %.*s", hex, (int)k, ascii);
+ ofono_debug(" *%-48s : %.*s", hex, (int) k, ascii);
}
static const char *res_to_name(uint8_t res, uint8_t id)
};
const struct iovec iov[4] = {
- { (uint8_t *)top, sizeof(top) },
+ { (uint8_t *) top, sizeof(top) },
{ cd->username, username_len },
- { (uint8_t *)bottom, sizeof(bottom) },
+ { (uint8_t *) bottom, sizeof(bottom) },
{ cd->password, password_len },
};
};
const struct iovec iov[2] = {
- { (uint8_t *)req, sizeof(req) },
+ { (uint8_t *) req, sizeof(req) },
{ cd->apn, apn_len },
};
for (i = 0; i < N; i++) {
if (fileid == info[i].fileid) {
- cbd = isi_cb_data_new((void *)&info[i], cb, data);
+ cbd = isi_cb_data_new((void *) &info[i], cb, data);
g_idle_add(fake_file_info, cbd);
return;
}
DBG("Request failed: %s", sim_isi_cause_name(cause));
return FALSE;
}
+
return TRUE;
}
goto error;
bcd_len = info->sca[0];
+
if (bcd_len == 0 || bcd_len > 12)
goto error;
if (g_isi_sb_iter_get_id(&iter) != SMS_GSM_REPORT)
continue;
- if (!g_isi_sb_iter_get_struct(&iter, (void **)&report, len, 2))
+ if (!g_isi_sb_iter_get_struct(&iter, (void **) &report, len, 2))
goto error;
if (report->cause != SMS_OK)
if (g_isi_msg_id(msg) != SMS_MESSAGE_SEND_STATUS_IND)
return;
- if (!g_isi_msg_data_get_struct(msg, 0, (const void **)&info, len))
+ if (!g_isi_msg_data_get_struct(msg, 0, (const void **) &info, len))
return;
DBG("status=0x%"PRIx8", ref=0x%"PRIx8", route=0x%"PRIx8
if (add->type != SMS_GSM_0411_ADDRESS)
return FALSE;
+
break;
case SMS_COMMON_DATA:
if (!parse_sms_tpdu(&iter, com))
return FALSE;
+
break;
}
}
+
return TRUE;
}
if (g_isi_msg_id(msg) != SS_GSM_USSD_RECEIVE_IND)
return;
- if (!g_isi_msg_data_get_struct(msg, 0, (const void **)&info, len))
+ if (!g_isi_msg_data_get_struct(msg, 0, (const void **) &info, len))
return;
- if (!g_isi_msg_data_get_struct(msg, len, (const void **)&string,
+ if (!g_isi_msg_data_get_struct(msg, len, (const void **) &string,
info->len))
return;
/* USSD string goes here */
};
const struct iovec iov[2] = {
- { (uint8_t *)msg, sizeof(msg) },
- { (uint8_t *)pdu, len }
+ { (uint8_t *) msg, sizeof(msg) },
+ { (uint8_t *) pdu, len }
};
if (cbd == NULL || ud == NULL)
struct call_info *ci;
size_t len = sizeof(struct call_info);
- if (!g_isi_sb_iter_get_struct(sb, (void *)&ci, len, 2))
+ if (!g_isi_sb_iter_get_struct(sb, (void *) &ci, len, 2))
return NULL;
i = ci->call_id & 7;
size_t len = sizeof(struct call_addr_info);
char *addr;
- if (!g_isi_sb_iter_get_struct(sb, (void *)&ci, len, 2))
+ if (!g_isi_sb_iter_get_struct(sb, (void *) &ci, len, 2))
return NULL;
if (!g_isi_sb_iter_get_alpha_tag(sb, &addr, 2 * ci->addr_len, 12))
static void isi_wait_and_answer(struct isi_call_req_ctx *irc, int event)
{
- DBG("irc=%p event=%u", (void *)irc, event);
+ DBG("irc=%p event=%u", (void *) irc, event);
if (event != CALL_STATUS_TERMINATED)
return;
static void isi_wait_and_retrieve(struct isi_call_req_ctx *irc, int event)
{
- DBG("irc=%p event=%u", (void *)irc, event);
+ DBG("irc=%p event=%u", (void *) irc, event);
if (event != CALL_STATUS_TERMINATED)
return;