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/.
Holger Freyther holger at freyther.de> On 04 Apr 2016, at 17:49, msuraev at sysmocom.de wrote: > > From: Max <msuraev at sysmocom.de> > > Move functions for conversion between soft and unpacked bits to main > library as they are generally useful. Hi! > +void osmo_ubit2sbit(sbit_t *out, const ubit_t *in, unsigned int num_bits) > +{ > + int i; > + for (i = 0; i < num_bits; i++) > + out[i] = in[i] ? -127 : 127; > -static void > -ubit_to_sbit(sbit_t *dst, ubit_t *src, int n) either keep it with 'int' or at least be consistent. Doesn't the compiler warn here anyway? We don't expect to run on systems where sizeof(int) < sizeof(4) and num_bits > INT_MAX is very unlikely for our domain. Anyway. if you decide to to use unsigned (or size_t) then please be consistent and use it for num_bits and the index variable. thanks holger