[PATCH] Fix an endless loop in OSPF

Ondrej Fila Filip feela at network.cz
Thu Sep 4 15:23:42 CEST 2003


On Thu, 4 Sep 2003, Martin Mares wrote:

> Hi!
> 
> > -  u8 i,twoway,oldpriority;
> > +  u32 i;
> > +  u8 twoway,oldpriority;
> 
> I think that using types smaller than int for any local variables except
> structures and arrays is very impractical and should be avoided -- not
> only you risk problems of this type, but it's also in many cases slower
> [every time you do any arithmetic on them, they get automatically
> promoted to int and although the compiler is able to optimize out many
> of these promotions, many others remain].
> 
> It would be probably better to replace any u8's and u16's used for loops
> by unsigned int's.

Yes I know, this was an error.

			Feela


> 
> 				Have a nice fortnight
> 




More information about the Bird-users mailing list