[quagga-dev 1333] Re: ospfd dies -- bug in ospf_spf_consider_nexthop
paul at clubi.ie
Thu Jul 1 16:41:50 BST 2004
Right, best I can think of is something like:
#define LIST_LOOP_SAFE (LIST,VAL,THIS,NEXT) \
for ((THIS) = (LIST)->head; (THIS) != NULL; (THIS) = (NEXT))\
if (((VAL) = (THIS)->data) != NULL)
#define LIST_LOOP_SAFE_NEXT (THIS,NEXT) \
((THIS)->next != NULL) ? ((NEXT) = (THIS)->next) : ((NEXT) = (THIS));
usage would obviously be:
LIST_LOOP_SAFE (list, val, tn, nn)
LIST_LOOP_SAFE_NEXT (tn, nn);
1. is it worth it?
2. should we just replace existing LIST_LOOP with above (s/_SAFE//)
and update all users?
Paul Jakma paul at clubi.ie paul at jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam at dishone.st
Everything ends badly. Otherwise it wouldn't end.
More information about the Quagga-dev