[quagga-dev 5275] Re: mes_lookup / LOOKUP robustness

Paul Jakma Paul.Jakma at Sun.COM
Wed Feb 27 08:49:49 GMT 2008


On Tue, 26 Feb 2008, Andrew J. Schorr wrote:

> OK, that looks pretty good.  At the risk of being wrong again (I 
> shouldn't do code review while running a fever), would it make more 
> sense to do it this way?
>
>  int idx = index-meslist[0].key;
>
>  if ((idx >= 0) && (idx < max) && (meslist[idx].key == index))
>    return meslist[idx].str;

That seems more readable, yes. ;)

Hope the fever's gone soon!

regards,
-- 
Paul Jakma,
Solaris Networking                       Sun Microsystems, Scotland
http://opensolaris.org/os/project/quagga tel: EMEA x73150 / +44 15066 73150



More information about the Quagga-dev mailing list