On Tue, Jun 06, 2017 at 01:00:38PM +0200, Toke Høiland-Jørgensen wrote: > Christian Tacke <christian.tacke+bird.network...@cosmokey.com> writes: > > > Hi, > > > > just out of curiosity: > > > > On Mon, Jun 05, 2017 at 23:49:52 +0200, Toke Høiland-Jørgensen wrote: > > [...] > >> +int > >> +ip6_common_octets(ip6_addr a, ip6_addr b) > >> +{ > >> + int i, j, common = 0; > > [...] > > > > Why aren't you using an unsigned int here? > > No particular reason; I suppose muscle memory kicked in and gave me an > 'int'. You are right, of course, that it should probably be uint... :)
Well, beware of down-iteration in for(): for (j=3; j>=0; j--) That would not work with uint. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@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."
signature.asc
Description: Digital signature