[quagga-dev 1302] Re: ospfd dies -- bug in ospf_spf_consider_nexthop

Andrew J. Schorr aschorr at telemetry-investments.com
Sun Jun 20 15:44:28 BST 2004


On Sun, Jun 20, 2004 at 09:45:34AM -0400, Paul Jakma wrote:
> there's two answers really:
> 
> #define LIST_LOOP(L,V,N,O) \
>  for ((N) = (L)->head; (N); (N)=(O)) \
>   (O) = (N)->next; \
>   if (((V) = (N)->data) != NULL)
> 
> or Kir's problematic LIST_LOOP should just not use this macro.
> 
> I say the latter.

I think it's got to be the latter, because the patched LIST_LOOP macro
still has a curly brace problem, and it would require all invocations
of LIST_LOOP to add a 4th argument.  I count 174 uses of the LIST_LOOP
macro in the current code, so that seems like a daunting task.

The question that still remains is whether to fix the LISTNODE_DELETE
macro as I discussed in [quagga-dev 1295].  So far, there are no
uses of LISTNODE_DELETE except for Kir's patch.  If we are going to
keep that macro, I think it should be fixed, and it should be
used in the listnode_delete function (to reduce code duplication).

-Andy



More information about the Quagga-dev mailing list