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

James Carlson james.d.carlson at Sun.COM
Fri Feb 29 13:39:50 GMT 2008


Andrew J. Schorr writes:
> So this one returns "" if it doesn't find the message.
> And it does not check whether 'pnt->str' might be NULL.
> 
> Does this matter?

I wouldn't think so.  pnt->str == NULL means that the table has an
explicit entry that intentionally maps to NULL.  Either the caller
meant for that to happen, or it's a caller coding error.

At most, this function could assert pnt->str != NULL, but I don't
think this is the same condition as in the other look-up function.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677



More information about the Quagga-dev mailing list