summaryrefslogtreecommitdiffstats
path: root/isisd/isis_te.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2017-02-13 19:27:54 +0100
committerChristian Franke <chris@opensourcerouting.org>2017-02-13 19:27:54 +0100
commitf75352362c0c2f0142d54c88f5ab03afb84f6ef1 (patch)
tree4f140c2c48c26bbab0cc9db7c62dc5b5c26985f8 /isisd/isis_te.c
parentMerge pull request #191 from opensourcerouting/ospfclient-incl (diff)
downloadfrr-f75352362c0c2f0142d54c88f5ab03afb84f6ef1.tar.xz
frr-f75352362c0c2f0142d54c88f5ab03afb84f6ef1.zip
isisd: address coverity findings
Diffstat (limited to 'isisd/isis_te.c')
-rw-r--r--isisd/isis_te.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/isisd/isis_te.c b/isisd/isis_te.c
index ecbb63c92..51919bb3f 100644
--- a/isisd/isis_te.c
+++ b/isisd/isis_te.c
@@ -985,17 +985,15 @@ show_vty_unknown_tlv (struct vty *vty, struct subtlv_header *tlvh)
void
mpls_te_print_detail(struct vty *vty, struct te_is_neigh *te)
{
- struct subtlv_header *tlvh, *next;
+ struct subtlv_header *tlvh;
u_int16_t sum = 0;
zlog_debug ("ISIS MPLS-TE: Show database TE detail");
tlvh = (struct subtlv_header *)te->sub_tlvs;
- for (; sum < te->sub_tlvs_length; tlvh = (next ? next : SUBTLV_HDR_NEXT (tlvh)))
+ for (; sum < te->sub_tlvs_length; tlvh = SUBTLV_HDR_NEXT (tlvh))
{
- next = NULL;
-
switch (tlvh->type)
{
case TE_SUBTLV_ADMIN_GRP:
@@ -1222,13 +1220,10 @@ DEFUN (show_isis_mpls_te_router,
{
vty_out (vty, "--- MPLS-TE router parameters ---%s", VTY_NEWLINE);
- if (vty != NULL)
- {
- if (ntohs (isisMplsTE.router_id.s_addr) != 0)
- vty_out (vty, " Router-Address: %s%s", inet_ntoa (isisMplsTE.router_id), VTY_NEWLINE);
- else
- vty_out (vty, " N/A%s", VTY_NEWLINE);
- }
+ if (ntohs (isisMplsTE.router_id.s_addr) != 0)
+ vty_out (vty, " Router-Address: %s%s", inet_ntoa (isisMplsTE.router_id), VTY_NEWLINE);
+ else
+ vty_out (vty, " N/A%s", VTY_NEWLINE);
}
else
vty_out (vty, " MPLS-TE is disable on this router%s", VTY_NEWLINE);