ospfd: Cleanup set but unused variables

There existed some variables set but never used.  Clean this up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2020-02-24 08:37:34 -05:00
parent 2acf1ad1dd
commit 6e3e2c6d5f
4 changed files with 6 additions and 8 deletions

View File

@ -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 "

View File

@ -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;

View File

@ -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;

View File

@ -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;
}