pimd: Remove unnecessary asserts

When we handle the thread arguments,
there is no need to assert.  As that
if they are wrong, we are going down
shortly anyways.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-11-08 15:49:28 -05:00
parent 220d8a49e6
commit 7f8b8a9af6
11 changed files with 0 additions and 43 deletions

View File

@ -516,12 +516,9 @@ static int on_assert_timer(struct thread *t)
struct pim_ifchannel *ch;
struct interface *ifp;
zassert(t);
ch = THREAD_ARG(t);
zassert(ch);
ifp = ch->interface;
zassert(ifp);
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug("%s: (S,G)=%s timer expired on interface %s",

View File

@ -489,9 +489,7 @@ static int on_ifjoin_expiry_timer(struct thread *t)
{
struct pim_ifchannel *ch;
zassert(t);
ch = THREAD_ARG(t);
zassert(ch);
ch->t_ifjoin_expiry_timer = NULL;
@ -510,9 +508,7 @@ static int on_ifjoin_prune_pending_timer(struct thread *t)
struct interface *ifp;
struct pim_interface *pim_ifp;
zassert(t);
ch = THREAD_ARG(t);
zassert(ch);
ch->t_ifjoin_prune_pending_timer = NULL;

View File

@ -153,9 +153,7 @@ static int pim_igmp_other_querier_expire(struct thread *t)
{
struct igmp_sock *igmp;
zassert(t);
igmp = THREAD_ARG(t);
zassert(igmp);
zassert(igmp->t_other_querier_timer);
zassert(!igmp->t_igmp_query_timer);
@ -598,11 +596,8 @@ static int pim_igmp_general_query(struct thread *t)
struct pim_interface *pim_ifp;
int query_buf_size;
zassert(t);
igmp = THREAD_ARG(t);
zassert(igmp);
zassert(igmp->interface);
zassert(igmp->interface->info);
@ -898,9 +893,7 @@ static int igmp_group_timer(struct thread *t)
{
struct igmp_group *group;
zassert(t);
group = THREAD_ARG(t);
zassert(group);
if (PIM_DEBUG_IGMP_TRACE) {
char group_str[INET_ADDRSTRLEN];

View File

@ -115,9 +115,7 @@ static int igmp_source_timer(struct thread *t)
struct igmp_source *source;
struct igmp_group *group;
zassert(t);
source = THREAD_ARG(t);
zassert(source);
group = source->source_group;
@ -1245,9 +1243,7 @@ static int igmp_group_retransmit(struct thread *t)
int num_retransmit_sources_left;
int send_with_sflag_set; /* boolean */
zassert(t);
group = THREAD_ARG(t);
zassert(group);
if (PIM_DEBUG_IGMP_TRACE) {
char group_str[INET_ADDRSTRLEN];

View File

@ -528,11 +528,8 @@ static int mroute_read(struct thread *t)
int fd;
int result;
zassert(t);
zassert(!THREAD_ARG(t));
fd = THREAD_FD(t);
zassert(fd == qpim_mroute_socket_fd);
result = mroute_read_msg(fd);

View File

@ -106,9 +106,7 @@ pim_msdp_sa_state_timer_cb(struct thread *t)
{
struct pim_msdp_sa *sa;
zassert(t);
sa = THREAD_ARG(t);
zassert(sa);
if (PIM_DEBUG_MSDP_EVENTS) {
pim_msdp_sa_timer_expiry_log(sa, "state");
@ -595,9 +593,7 @@ pim_msdp_peer_hold_timer_cb(struct thread *t)
{
struct pim_msdp_peer *mp;
zassert(t);
mp = THREAD_ARG(t);
zassert(mp);
if (PIM_DEBUG_MSDP_EVENTS) {
pim_msdp_peer_timer_expiry_log(mp, "hold");
@ -630,9 +626,7 @@ pim_msdp_peer_ka_timer_cb(struct thread *t)
{
struct pim_msdp_peer *mp;
zassert(t);
mp = THREAD_ARG(t);
zassert(mp);
if (PIM_DEBUG_MSDP_EVENTS) {
pim_msdp_peer_timer_expiry_log(mp, "ka");
@ -695,9 +689,7 @@ pim_msdp_peer_cr_timer_cb(struct thread *t)
{
struct pim_msdp_peer *mp;
zassert(t);
mp = THREAD_ARG(t);
zassert(mp);
if (PIM_DEBUG_MSDP_EVENTS) {
pim_msdp_peer_timer_expiry_log(mp, "connect-retry");

View File

@ -211,9 +211,7 @@ static int on_neighbor_timer(struct thread *t)
struct interface *ifp;
char msg[100];
zassert(t);
neigh = THREAD_ARG(t);
zassert(neigh);
ifp = neigh->interface;

View File

@ -295,11 +295,7 @@ static int pim_sock_read(struct thread *t)
ifindex_t ifindex = -1;
int result = -1; /* defaults to bad */
zassert(t);
ifp = THREAD_ARG(t);
zassert(ifp);
fd = THREAD_FD(t);
pim_ifp = ifp->info;
@ -695,9 +691,7 @@ static int on_pim_hello_send(struct thread *t)
struct pim_interface *pim_ifp;
struct interface *ifp;
zassert(t);
ifp = THREAD_ARG(t);
zassert(ifp);
pim_ifp = ifp->info;

View File

@ -315,10 +315,7 @@ static int ssmpingd_sock_read(struct thread *t)
int sock_fd;
int result;
zassert(t);
ss = THREAD_ARG(t);
zassert(ss);
sock_fd = THREAD_FD(t);
zassert(sock_fd == ss->sock_fd);

View File

@ -243,9 +243,7 @@ static int on_join_timer(struct thread *t)
{
struct pim_upstream *up;
zassert(t);
up = THREAD_ARG(t);
zassert(up);
up->t_join_timer = NULL;

View File

@ -531,7 +531,6 @@ void pim_scan_oil()
static int on_rpf_cache_refresh(struct thread *t)
{
zassert(t);
zassert(qpim_rpf_cache_refresher);
qpim_rpf_cache_refresher = 0;