]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf6d, zebra: remove unnecessary asserts
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 5 May 2017 21:55:29 +0000 (21:55 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 9 May 2017 20:44:23 +0000 (20:44 +0000)
These pointers are now guaranteed to be null, so asserting the opposite
will crash.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
ospf6d/ospf6_lsa.c
zebra/zebra_fpm.c

index a993869a91af4d370a5514ca775692b586133c53..38229541acfb541bba7784440b510a8fae4787bb 100644 (file)
@@ -696,7 +696,6 @@ ospf6_lsa_refresh (struct thread *thread)
   struct ospf6_lsa *old, *self, *new;
   struct ospf6_lsdb *lsdb_self;
 
-  assert (thread);
   old = (struct ospf6_lsa *) THREAD_ARG (thread);
   assert (old && old->header);
 
index e8fa6e116cef127b5e61968426d3d52844a3fb10..cf8f78afe93d93eea9717cb3ca884f6cd4886998 100644 (file)
@@ -535,7 +535,6 @@ zfpm_conn_up_thread_cb (struct thread *thread)
   zfpm_rnodes_iter_t *iter;
   rib_dest_t *dest;
 
-  assert (zfpm_g->t_conn_up);
   zfpm_g->t_conn_up = NULL;
 
   iter = &zfpm_g->t_conn_up_state.iter;
@@ -655,7 +654,6 @@ zfpm_conn_down_thread_cb (struct thread *thread)
 
   assert (zfpm_g->state == ZFPM_STATE_IDLE);
 
-  assert (zfpm_g->t_conn_down);
   zfpm_g->t_conn_down = NULL;
 
   iter = &zfpm_g->t_conn_down_state.iter;
@@ -758,7 +756,6 @@ zfpm_read_cb (struct thread *thread)
   fpm_msg_hdr_t *hdr;
 
   zfpm_g->stats.read_cb_calls++;
-  assert (zfpm_g->t_read);
   zfpm_g->t_read = NULL;
 
   /*
@@ -1047,7 +1044,6 @@ zfpm_write_cb (struct thread *thread)
   int num_writes;
 
   zfpm_g->stats.write_cb_calls++;
-  assert (zfpm_g->t_write);
   zfpm_g->t_write = NULL;
 
   /*
@@ -1139,7 +1135,6 @@ zfpm_connect_cb (struct thread *t)
   int sock, ret;
   struct sockaddr_in serv;
 
-  assert (zfpm_g->t_connect);
   zfpm_g->t_connect = NULL;
   assert (zfpm_g->state == ZFPM_STATE_ACTIVE);
 
@@ -1390,7 +1385,6 @@ zfpm_trigger_update (struct route_node *rn, const char *reason)
 static int
 zfpm_stats_timer_cb (struct thread *t)
 {
-  assert (zfpm_g->t_stats);
   zfpm_g->t_stats = NULL;
 
   /*