On Mon, Feb 15, 2016 at 01:35:31PM +0100, Sven Eckelmann wrote:
> It is easy to see that
> 
>     batadv_ogm_packet::tq (u8 255) *
>     tq_own (u8 255) *
>     tq_asym_penalty (int 134) *
>     tq_iface_penalty (int 255)
> 
> is outside the range of an signed integer (32 bit). The maximum seen
> here is 255 for each entry. So should tq_iface_penalty +
> tq_iface_penalty, inv_asym_penalty be changed to unsigned int?

Given that all these values are in the TQ domain I'd say that they should all be
positive all the time, therefore there is no gain in using a signed variable
here.

Marek, what do you think ?

Cheers,

-- 
Antonio Quartulli

Attachment: signature.asc
Description: Digital signature

Reply via email to