Skip to content

Commit fd8442f

Browse files
fxlbguyharris
authored andcommitted
LDP: Avoid reinventing nd_printjn()
1 parent e9b56c0 commit fd8442f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

print-ldp.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ ldp_tlv_print(netdissect_options *ndo,
285285
const struct ldp_tlv_header *ldp_tlv_header;
286286
u_short tlv_type,tlv_len,tlv_tlen,af,ft_flags;
287287
u_char fec_type, transport_pref;
288-
u_int ui,vc_info_len, vc_info_tlv_type, vc_info_tlv_len,idx;
288+
u_int ui,vc_info_len, vc_info_tlv_type, vc_info_tlv_len;
289289
char buf[100];
290290
int i;
291291

@@ -500,8 +500,7 @@ ldp_tlv_print(netdissect_options *ndo,
500500

501501
case LDP_FEC_MARTINI_IFPARM_DESC:
502502
ND_PRINT(": ");
503-
for (idx = 2; idx < vc_info_tlv_len; idx++)
504-
fn_print_char(ndo, GET_U_1(tptr + idx));
503+
nd_printjn(ndo, tptr + 2, vc_info_tlv_len - 2);
505504
break;
506505

507506
case LDP_FEC_MARTINI_IFPARM_VCCV:

0 commit comments

Comments
 (0)