diff options
author | gdt <gdt> | 2004-12-09 16:30:04 +0000 |
---|---|---|
committer | gdt <gdt> | 2004-12-09 16:30:04 +0000 |
commit | f60528ecef682f72c4e0552f5f4dd0bc811ea02a (patch) | |
tree | a36324dd3402a9f10bc0bbf6dafb7a12e7134c33 /ospfd | |
parent | 57d86be6f9e38768984bfbe8cb6ae0978d96a6e4 (diff) | |
download | quagga-f60528ecef682f72c4e0552f5f4dd0bc811ea02a.tar.bz2 quagga-f60528ecef682f72c4e0552f5f4dd0bc811ea02a.tar.xz |
* ospf_apiserver.c (ospf_apiserver_term): Obtain struct
ospf_apiserver * from listnode. Remove unused variables. Follows
suggestion from Jay Fenlason.
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ChangeLog | 6 | ||||
-rw-r--r-- | ospfd/ospf_apiserver.c | 13 |
2 files changed, 8 insertions, 11 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index afa92c71..41256555 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,8 +1,8 @@ 2004-12-09 Greg Troxel <gdt@fnord.ir.bbn.com> - * ospf_apiserver.c (ospf_apiserver_term): Remove unused variable - nnode to fix warning. - (ospf_apiserver_term): add comment about obviously wrong code. + * ospf_apiserver.c (ospf_apiserver_term): Obtain struct + ospf_apiserver * from listnode. Remove unused variables. Follows + suggestion from Jay Fenlason. 2004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu> diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c index 07b8f211..89af2a36 100644 --- a/ospfd/ospf_apiserver.c +++ b/ospfd/ospf_apiserver.c @@ -180,20 +180,17 @@ out: void ospf_apiserver_term (void) { - struct listnode *node; struct ospf_apiserver *apiserv; /* Unregister wildcard [0/0] type */ ospf_delete_opaque_functab (0 /* all LSAs */, 0 /* all opaque types */); - /* Free all client instances */ - while ( (node = listhead (apiserver_list)) != NULL) - /* - * XXX: this is just plain odd/wrong. Is there a missing - * apiserv = (struct ospf_apiserver *) node; - * ? - */ + /* + * Free all client instances. ospf_apiserver_free removes the node + * from the list, so we examine the head of the list anew each time. + */ + while ( (apiserv = getdata (listhead (apiserver_list))) != NULL) ospf_apiserver_free (apiserv); /* Free client list itself */ |