[quagga-dev 1297] Re: ospfd dies -- bug in ospf_spf_consider_nexthop
Andrew J. Schorr
aschorr at telemetry-investments.com
Sun Jun 20 04:35:38 BST 2004
On Sat, Jun 19, 2004 at 11:10:27PM -0400, Paul Jakma wrote:
> Probably the LIST_LOOP should be replaced with:
> #define LIST_LOOP(L,V,N) \
> for ((N) = (L)->head; (N);) \
> (N) = (N)->next; \
> if (((V) = (N)->data) != NULL)
> shouldnt break anything, as no users of LIST_LOOP are likely
> interested in N (its sets V after all) and i'll bet the crash Kir
> noted isnt the only such case of this problematic usage of LIST_LOOP.
> Kir, could you test with the above macro and see if it works?
Actually, don't you need to set (V) = (N)->data before you
set (N) = (N)->next?
Even so, that leaves a curly brace problem (i.e. the "if" statement is
no longer inside the "for" loop).
More information about the Quagga-dev