]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf_apiserver_term:
authorgdt <gdt>
Thu, 9 Dec 2004 14:51:03 +0000 (14:51 +0000)
committergdt <gdt>
Thu, 9 Dec 2004 14:51:03 +0000 (14:51 +0000)
  Remove unused variable.

  Add comment: this is seriously broken, and needs fixing.  It appears
  likely to segfault if ever called.  Comments please - should I make
  the fix I suggest in the comment?  -gdt

ospfd/ChangeLog
ospfd/ospf_apiserver.c

index 77f6899f1d15213a0e520ca370a9db4bbd4b17ba..afa92c719b7c2126586a9355814c62414e1edb20 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * *.c: Change level of debug messages to LOG_DEBUG.
index 4f294f718da0fc020d11540687dd69d09cd0417e..07b8f211ae36eb1078792b8a413e000bf2109dd7 100644 (file)
@@ -180,7 +180,7 @@ out:
 void
 ospf_apiserver_term (void)
 {
-  struct listnode *node, *nnode;
+  struct listnode *node;
   struct ospf_apiserver *apiserv;
 
   /* Unregister wildcard [0/0] type */
@@ -189,6 +189,11 @@ ospf_apiserver_term (void)
 
   /* 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;
+     * ?
+     */
     ospf_apiserver_free (apiserv);
 
   /* Free client list itself */