[PATCH 1/2] Refactor mncc code

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Max msuraev at sysmocom.de
Wed Apr 6 13:54:59 UTC 2016



On 04/05/2016 10:47 PM, Holger Freyther wrote:
>
> -int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t lchan_mode)
> +int gsm48_lchan_modify(struct gsm_lchan *lchan, enum gsm48_chan_mode lchan_mode)
> {
> -	int rc;
> -
> -	rc = gsm48_tx_chan_mode_modify(lchan, lchan_mode);
> -	if (rc < 0)
> -		return rc;
> -
> -	return rc;
> +	return gsm48_tx_chan_mode_modify(lchan, lchan_mode);
> }
>
> hehe, split this into a separate patch. Yes, it is obvious it returns rc either way and let's assume we don't have a unsigned -> int kind of conversion here.
>
>
Can we remove this wrapper altogether and just use the function directly?
Also, no need to assume anything - both gsm48_tx_chan_mode_modify() and
wrapper are returning int so there is no conversion.

-- 
Max Suraev <msuraev at sysmocom.de> http://www.sysmocom.de/
======================================================================= 
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93 
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B 
* Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte 




More information about the OpenBSC mailing list