> On 04 Apr 2016, at 17:49, [email protected] wrote:
> 
> From: Max <[email protected]>
> 
> 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

Reply via email to