On Thu, Dec 15, 2011 at 11:30:04AM +0100, Martin Mares wrote:
Hello!
But it seems that your problem is not exactly with signedness, but with overflow (instead of saturation). Overflow works also the same for signed and unsigned ones.
I thought about this some time ago and probably the best solution would be to switch BIRD completely to unsigned behavior (as most route properties with 32bit ranage are defined as unsigned) in some major release.
While I think that switching to unsigned is a good idea, I am not sure that silent overflows make sense. Maybe we should log the overflows or use saturation arithmetics instead.
You are probably right about silent overflows. I would prefer logging them because silent saturation may be unexpected to many users as well. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."