rename calloc to CALLOC provided from asn1c

This commit is contained in:
Sukchan Lee 2017-02-09 18:42:17 +09:00
parent 70e70dc5a6
commit d60ccdbb2d
2 changed files with 6 additions and 8 deletions

View File

@ -29,7 +29,7 @@ status_t s1ap_build_setup_rsp(pkbuf_t **pkbuf)
numServedGUMMEI = 1;
servedGUMMEI = (S1ap_ServedGUMMEIsItem_t *)
calloc(numServedGUMMEI, sizeof(S1ap_ServedGUMMEIsItem_t));
CALLOC(numServedGUMMEI, sizeof(S1ap_ServedGUMMEIsItem_t));
for (i = 0; i < numServedGUMMEI; i++)
{
srvd_gummei_t *srvd_gummei = &mme_self()->srvd_gummei;
@ -37,7 +37,7 @@ status_t s1ap_build_setup_rsp(pkbuf_t **pkbuf)
for (j = 0; j < srvd_gummei->num_of_plmn_id; j++)
{
plmnIdentity = (S1ap_PLMNidentity_t *)
calloc(srvd_gummei->num_of_plmn_id,
CALLOC(srvd_gummei->num_of_plmn_id,
sizeof(S1ap_PLMNidentity_t));
MCC_MNC_TO_TBCD(mcc, mnc, mnc_digit_len, plmnIdentity);
ASN_SEQUENCE_ADD(&servedGUMMEI->servedPLMNs, plmnIdentity);
@ -46,7 +46,7 @@ status_t s1ap_build_setup_rsp(pkbuf_t **pkbuf)
for (j = 0; j < srvd_gummei->num_of_grp_id; j++)
{
mmeGroupId = (S1ap_MME_Group_ID_t *)
calloc(srvd_gummei->num_of_grp_id,
CALLOC(srvd_gummei->num_of_grp_id,
sizeof(S1ap_MME_Group_ID_t));
INT16_TO_OCTET_STRING(srvd_gummei->grp_id[j], mmeGroupId);
ASN_SEQUENCE_ADD(&servedGUMMEI->servedGroupIDs, mmeGroupId);
@ -55,7 +55,7 @@ status_t s1ap_build_setup_rsp(pkbuf_t **pkbuf)
for (j = 0; j < srvd_gummei->num_of_code; j++)
{
mmeCode = (S1ap_MME_Code_t *)
calloc(srvd_gummei->num_of_grp_id,
CALLOC(srvd_gummei->num_of_grp_id,
sizeof(S1ap_MME_Code_t));
INT8_TO_OCTET_STRING(srvd_gummei->code[j], mmeCode);
ASN_SEQUENCE_ADD(&servedGUMMEI->servedMMECs, mmeCode);

View File

@ -180,10 +180,10 @@ static void s1ap_test5(abts_case *tc, void *data)
&s1SetupRequestIEs->global_ENB_ID.pLMNidentity);
supportedTA = (S1ap_SupportedTAs_Item_t *)
calloc(1, sizeof(S1ap_SupportedTAs_Item_t));
CALLOC(1, sizeof(S1ap_SupportedTAs_Item_t));
INT16_TO_OCTET_STRING(tac, &supportedTA->tAC);
plmnIdentity = (S1ap_PLMNidentity_t *)
calloc(1, sizeof(S1ap_PLMNidentity_t));
CALLOC(1, sizeof(S1ap_PLMNidentity_t));
MCC_MNC_TO_TBCD(mcc, mnc, mnc_digit_len, plmnIdentity);
ASN_SEQUENCE_ADD(&supportedTA->broadcastPLMNs, plmnIdentity);
@ -214,10 +214,8 @@ abts_suite *test_s1ap(abts_suite *suite)
abts_run_test(suite, s1ap_test1, NULL);
abts_run_test(suite, s1ap_test2, NULL);
abts_run_test(suite, s1ap_test3, NULL);
#if 0
abts_run_test(suite, s1ap_test4, NULL);
abts_run_test(suite, s1ap_test5, NULL);
#endif
return suite;
}