diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index b4690cfa42..a8dfcbb36b 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -670,8 +670,7 @@ static int ospf_abr_translate_nssa(struct ospf_area *area, struct ospf_lsa *lsa) * originate translated LSA */ - if ((new = ospf_translated_nssa_originate(area->ospf, lsa)) - == NULL) { + if (ospf_translated_nssa_originate(area->ospf, lsa) == NULL) { if (IS_DEBUG_OSPF_NSSA) zlog_debug( "ospf_abr_translate_nssa(): Could not translate " diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index dffcb930e4..a16fb81ce3 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -158,12 +158,12 @@ const char *ospf_timeval_dump(struct timeval *t, char *buf, size_t size) #define HOUR_IN_SECONDS (60*MINUTE_IN_SECONDS) #define DAY_IN_SECONDS (24*HOUR_IN_SECONDS) #define WEEK_IN_SECONDS (7*DAY_IN_SECONDS) - unsigned long w, d, h, m, s, ms, us; + unsigned long w, d, h, m, ms, us; if (!t) return "inactive"; - w = d = h = m = s = ms = us = 0; + w = d = h = m = ms = 0; memset(buf, 0, size); us = t->tv_usec; diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index a989b8468c..b042a06372 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -1557,8 +1557,8 @@ struct ospf_lsa *ospf_opaque_lsa_install(struct ospf_lsa *lsa, int rt_recalc) ospf_lsa_unlock(&oipi->lsa); oipi->lsa = ospf_lsa_lock(lsa); } - /* Register the new lsa entry and get its control info. */ - else if ((oipi = register_opaque_lsa(lsa)) == NULL) { + /* Register the new lsa entry */ + else if (register_opaque_lsa(lsa) == NULL) { flog_warn(EC_OSPF_LSA, "ospf_opaque_lsa_install: register_opaque_lsa() ?"); goto out; diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 64013435f6..d415256652 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -1002,7 +1002,6 @@ static int ospf_distribute_list_update_timer(struct thread *thread) void ospf_distribute_list_update(struct ospf *ospf, int type, unsigned short instance) { - struct route_table *rt; struct ospf_external *ext; void **args = XCALLOC(MTYPE_OSPF_DIST_ARGS, sizeof(void *) * 2); @@ -1011,7 +1010,7 @@ void ospf_distribute_list_update(struct ospf *ospf, int type, /* External info does not exist. */ ext = ospf_external_lookup(ospf, type, instance); - if (!ext || !(rt = EXTERNAL_INFO(ext))) { + if (!ext || !EXTERNAL_INFO(ext)) { XFREE(MTYPE_OSPF_DIST_ARGS, args); return; }