[quagga-dev 8305] Re: zalloc rules

paul at jakma.org paul at jakma.org
Tue Sep 21 11:34:32 BST 2010


On Sat, 18 Sep 2010, Greg Troxel wrote:

> The problem (may be | is) that in a lot of situations, there may be
> (unexpressed) invariants that pointers contain an allocated object.
>
> If consensus is that NULL being an ok value to pass to realloc, 
> then I don't want to be pigheaded about this - my concern is that 
> there's likely underlying sloppy code.

That's possible, but OTOH, the underlying API allows it - and it does 
seem like deliberate use of that feature could make code more 
readable.

> If someone finds where this assert hits and we can evaluate a few actual
> cases, that would be very interesting.

Yeah, that'd be interesting alright. Problem is, will the person 
whose router hits the assert find it interesting?

regards,
-- 
Paul Jakma	paul at jakma.org	Key ID: 64A2FF6A
Fortune:
Incorrectly configured static routes on the corerouters.



More information about the Quagga-dev mailing list