diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-08-20 20:05:53 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-09-06 22:50:58 +0200 |
commit | 266469ebababa2d6949bbd22390010d422a68356 (patch) | |
tree | a5b15fdf7d24d393645d2e898350a87a5b59f9d8 /ospfd/ospf_te.c | |
parent | lib: Modify zlog_warn to vty_out (diff) | |
download | frr-266469ebababa2d6949bbd22390010d422a68356.tar.xz frr-266469ebababa2d6949bbd22390010d422a68356.zip |
ospfd: Cleanup some warnings that were not warnings
1) stream allocation cannot fail
2) some warnings were removed when functions safely ignored
the calling parameters being wrong.
3) some warnings were removed when functions did not consider
the state as an error since we did not return an error code.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_te.c')
-rw-r--r-- | ospfd/ospf_te.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index a9dc1c18e..f8722f9c8 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -1146,10 +1146,7 @@ static struct ospf_lsa *ospf_mpls_te_lsa_new(struct ospf *ospf, uint16_t length; /* Create a stream for LSA. */ - if ((s = stream_new(OSPF_MAX_LSA_SIZE)) == NULL) { - zlog_warn("ospf_mpls_te_lsa_new: stream_new() ?"); - return NULL; - } + s = stream_new(OSPF_MAX_LSA_SIZE); lsah = (struct lsa_header *)STREAM_DATA(s); options = OSPF_OPTION_O; /* Don't forget this :-) */ @@ -1286,7 +1283,7 @@ static int ospf_mpls_te_lsa_originate_area(void *arg) if (CHECK_FLAG(lp->flags, LPFLG_LSA_ENGAGED)) { if (CHECK_FLAG(lp->flags, LPFLG_LSA_FORCED_REFRESH)) { UNSET_FLAG(lp->flags, LPFLG_LSA_FORCED_REFRESH); - zlog_warn( + zlog_info( "OSPF MPLS-TE (ospf_mpls_te_lsa_originate_area): Refresh instead of Originate"); ospf_mpls_te_lsa_schedule(lp, REFRESH_THIS_LSA); } @@ -1294,7 +1291,7 @@ static int ospf_mpls_te_lsa_originate_area(void *arg) } if (!is_mandated_params_set(lp)) { - zlog_warn( + zlog_info( "ospf_mpls_te_lsa_originate_area: Link(%s) lacks some mandated MPLS-TE parameters.", lp->ifp ? lp->ifp->name : "?"); continue; |