]> git.puffer.fish Git - mirror/frr.git/commitdiff
[ospfd] CID #29, fix missing NULL check by removing unused code.
authorPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 22:57:57 +0000 (22:57 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 22:57:57 +0000 (22:57 +0000)
2006-05-12 Paul Jakma <paul.jakma@sun.com>

* ospf_lsa.c: (ospf_lsa_action) Get rid of the ospf_lookup
  call, which is not checked for NULL return, by stripping out
  functionality which is never used, hence fixing Coverity CID
  #29.
  (struct lsa_action) remove unused member.

ospfd/ChangeLog
ospfd/ospf_lsa.c

index dabef49e20d1585e7b724583a50df8e01ee1d4d7..a11c7c970e248bc37dfd5747f68e88d5dc4c9ce1 100644 (file)
@@ -1,3 +1,11 @@
+2006-05-12 Paul Jakma <paul.jakma@sun.com>
+
+       * ospf_lsa.c: (ospf_lsa_action) Get rid of the ospf_lookup
+         call, which is not checked for NULL return, by stripping out
+         functionality which is never used, hence fixing Coverity CID
+         #29.
+         (struct lsa_action) remove unused member.
+
 2006-05-11 Paul Jakma <paul.jakma@sun.com>
 
        * ospf_vty.c: (general) Audit ospf_lookup calls in commands,
index 9a8874592bd6dd5ac3ff1a72d6be4257fcd941bf..9ef5a6ae6b3085724e5f78eeb8c46f0a517fd6c9 100644 (file)
@@ -3615,18 +3615,13 @@ ospf_lsa_unique_id (struct ospf *ospf,
 }
 
 \f
-#define LSA_ACTION_ORIGN_RTR  1
-#define LSA_ACTION_ORIGN_NET  2
-#define LSA_ACTION_FLOOD_AREA 3
-#define LSA_ACTION_FLOOD_AS   4
-#define LSA_ACTION_FLUSH_AREA 5
-#define LSA_ACTION_FLUSH_AS   6
+#define LSA_ACTION_FLOOD_AREA 1
+#define LSA_ACTION_FLUSH_AREA 2
 
 struct lsa_action
 {
   u_char action;
   struct ospf_area *area;
-  struct ospf_interface *oi; 
   struct ospf_lsa *lsa;
 };
 
@@ -3634,9 +3629,6 @@ static int
 ospf_lsa_action (struct thread *t)
 {
   struct lsa_action *data;
-  struct ospf *ospf;
-
-  ospf = ospf_lookup ();
 
   data = THREAD_ARG (t);
 
@@ -3646,24 +3638,12 @@ ospf_lsa_action (struct thread *t)
 
   switch (data->action)
     {
-    case LSA_ACTION_ORIGN_RTR:
-      ospf_router_lsa_refresh (data->area->router_lsa_self);
-      break;
-    case LSA_ACTION_ORIGN_NET:
-      ospf_network_lsa_originate (data->oi);
-      break;
     case LSA_ACTION_FLOOD_AREA:
       ospf_flood_through_area (data->area, NULL, data->lsa);
       break;
-    case LSA_ACTION_FLOOD_AS:
-      ospf_flood_through_as (ospf, NULL, data->lsa);
-      break;
     case LSA_ACTION_FLUSH_AREA:
       ospf_lsa_flush_area (data->lsa, data->area);
       break;
-    case LSA_ACTION_FLUSH_AS:
-      ospf_lsa_flush_as (ospf, data->lsa);
-      break;
     }
 
   ospf_lsa_unlock (data->lsa);