Potential bug / problematic code in gsm411_rx_rl_data()
Sylvain Munaut
246tnt at gmail.com
Wed Jan 2 10:35:35 CET 2013
> In gsm411_sms.c the function gsm411_rx_rl_data receives "struct gsm48_hdr
> *gh" as input then in very first line typecasts the pointer to "struct
> gsm411_rp_hdr *rp_data" to access its "data" field.
>
>> struct gsm411_rp_hdr *rp_data = (struct gsm411_rp_hdr*)&gh->data;
That's not what it does .... you need to either re-read that line or
re-read a book on C programming.
What is type casted is the pointer to gsm48_hdr data field. And that's
because the data field of the gsm48_hdr contains a gsm411_rp_hdr in
this case.
> Request you to correct and update suitably.
Well, I request you check your claims before making them ...
Cheers,
Sylvain
More information about the baseband-devel
mailing list