M
Madhu
My question is quite basic. I have a function "ds707_async_orig_hdlr"
which gets called by another module.
cm_cdma_orig_params_s_type : is a struct defined in teh same file
as this function.
Now, when the entire code (with all other files) is run, I get a lint
error that points to the possibility of assignment to a NULL pointer in
the lines assigning values to the pointer to struct -
cdma_orig_params_ptr.
The code compiles and runs fine. Only lint is giving trouble. (Error
613 in Gimpel)
Is it because I haven't done a malloc here for cdma_orig_params_ptr ?
What is the problem ?
void ds707_async_orig_hdlr
(
const byte *dial_string,
int dial_string_len,
cm_cdma_orig_params_s_type *cdma_orig_params_ptr
)
{
cdma_orig_params_ptr->srv_opt = uint16 orig_so;
cdma_orig_params_ptr->activate_code = CM_OTASP_ACT_CODE_NONE;
cdma_orig_params_ptr->drs_bit = 1; /* maybe NA in async
*/
cdma_orig_params_ptr->sr_id_included = FALSE;
cdma_orig_params_ptr->qos_parms_incl = FALSE;
cdma_orig_params_ptr->last_act_data_net = SYS_SYS_MODE_NO_SRV;
*cdma_params_changed = TRUE;
*cm_srv_type = CM_SRV_TYPE_CDMA_SPECIFIC;
}
which gets called by another module.
cm_cdma_orig_params_s_type : is a struct defined in teh same file
as this function.
Now, when the entire code (with all other files) is run, I get a lint
error that points to the possibility of assignment to a NULL pointer in
the lines assigning values to the pointer to struct -
cdma_orig_params_ptr.
The code compiles and runs fine. Only lint is giving trouble. (Error
613 in Gimpel)
Is it because I haven't done a malloc here for cdma_orig_params_ptr ?
What is the problem ?
void ds707_async_orig_hdlr
(
const byte *dial_string,
int dial_string_len,
cm_cdma_orig_params_s_type *cdma_orig_params_ptr
)
{
cdma_orig_params_ptr->srv_opt = uint16 orig_so;
cdma_orig_params_ptr->activate_code = CM_OTASP_ACT_CODE_NONE;
cdma_orig_params_ptr->drs_bit = 1; /* maybe NA in async
*/
cdma_orig_params_ptr->sr_id_included = FALSE;
cdma_orig_params_ptr->qos_parms_incl = FALSE;
cdma_orig_params_ptr->last_act_data_net = SYS_SYS_MODE_NO_SRV;
*cdma_params_changed = TRUE;
*cm_srv_type = CM_SRV_TYPE_CDMA_SPECIFIC;
}