diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2021-01-08 16:21:39 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2021-01-08 17:12:12 +0100 |
commit | 3ed92cd021a619c8dbff377edd8eb66b3ec285c9 (patch) | |
tree | 9c629ba7661d7ba2a545a23a509e1a0b8cdc4ee0 | |
parent | 90ddb17d272bbe39dccc08f7b109077b73996fee (diff) | |
download | tcpdump-3ed92cd021a619c8dbff377edd8eb66b3ec285c9.tar.gz |
Replace the (void)nd_printn(..., NULL) calls by nd_printjn() calls
Moreover:
Remove a now useless comment.
-rw-r--r-- | print-aoe.c | 2 | ||||
-rw-r--r-- | print-bfd.c | 2 | ||||
-rw-r--r-- | print-bgp.c | 2 | ||||
-rw-r--r-- | print-bootp.c | 10 | ||||
-rw-r--r-- | print-cdp.c | 4 | ||||
-rw-r--r-- | print-lldp.c | 2 | ||||
-rw-r--r-- | print-lwres.c | 2 | ||||
-rw-r--r-- | print-olsr.c | 2 | ||||
-rw-r--r-- | print-openflow-1.0.c | 4 | ||||
-rw-r--r-- | print-radius.c | 6 | ||||
-rw-r--r-- | print-rpki-rtr.c | 3 | ||||
-rw-r--r-- | print-syslog.c | 2 | ||||
-rw-r--r-- | print-udld.c | 2 |
13 files changed, 21 insertions, 22 deletions
diff --git a/print-aoe.c b/print-aoe.c index 0cd4299a..9704fd87 100644 --- a/print-aoe.c +++ b/print-aoe.c @@ -235,7 +235,7 @@ aoev1_query_print(netdissect_options *ndo, /* Config String */ if (cslen) { ND_PRINT("\n\tConfig String (length %u): ", cslen); - (void)nd_printn(ndo, cp, cslen, NULL); + nd_printjn(ndo, cp, cslen); } return; diff --git a/print-bfd.c b/print-bfd.c index 8c047357..e28046e7 100644 --- a/print-bfd.c +++ b/print-bfd.c @@ -222,7 +222,7 @@ auth_print(netdissect_options *ndo, const u_char *pptr) pptr++; ND_PRINT(", Password: "); /* the length is equal to the password length plus three */ - (void)nd_printn(ndo, pptr, auth_len - 3, NULL); + nd_printjn(ndo, pptr, auth_len - 3); break; case AUTH_MD5: case AUTH_MET_MD5: diff --git a/print-bgp.c b/print-bgp.c index 9688a4ed..a2095372 100644 --- a/print-bgp.c +++ b/print-bgp.c @@ -2984,7 +2984,7 @@ bgp_notification_print(netdissect_options *ndo, else { ND_TCHECK_LEN(tptr + 1, shutdown_comm_length); ND_PRINT(", Shutdown Communication (length: %u): \"", shutdown_comm_length); - (void)nd_printn(ndo, tptr+1, shutdown_comm_length, NULL); + nd_printjn(ndo, tptr+1, shutdown_comm_length); ND_PRINT("\""); remainder_offset += shutdown_comm_length + 1; } diff --git a/print-bootp.c b/print-bootp.c index 64b68e26..8449f0ff 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -678,7 +678,7 @@ rfc1048_print(netdissect_options *ndo, case 'a': /* ASCII strings */ ND_PRINT("\""); - (void)nd_printn(ndo, bp, len, NULL); + nd_printjn(ndo, bp, len); ND_PRINT("\""); bp += len; len = 0; @@ -822,7 +822,7 @@ rfc1048_print(netdissect_options *ndo, GET_U_1(bp + 1)); bp += 2; ND_PRINT("\""); - (void)nd_printn(ndo, bp, len - 3, NULL); + nd_printjn(ndo, bp, len - 3); ND_PRINT("\""); bp += len - 3; len = 0; @@ -842,7 +842,7 @@ rfc1048_print(netdissect_options *ndo, len--; if (type == 0) { ND_PRINT("\""); - (void)nd_printn(ndo, bp, len, NULL); + nd_printjn(ndo, bp, len); ND_PRINT("\""); bp += len; len = 0; @@ -885,7 +885,7 @@ rfc1048_print(netdissect_options *ndo, case AGENT_SUBOPTION_CIRCUIT_ID: /* fall through */ case AGENT_SUBOPTION_REMOTE_ID: case AGENT_SUBOPTION_SUBSCRIBER_ID: - (void)nd_printn(ndo, bp, suboptlen, NULL); + nd_printjn(ndo, bp, suboptlen); break; default: @@ -983,7 +983,7 @@ rfc1048_print(netdissect_options *ndo, break; } ND_PRINT("\""); - (void)nd_printn(ndo, bp, suboptlen, NULL); + nd_printjn(ndo, bp, suboptlen); ND_PRINT("\""); ND_PRINT(", length %u", suboptlen); suboptnumber++; diff --git a/print-cdp.c b/print-cdp.c index 9f5c24bc..157e5ed5 100644 --- a/print-cdp.c +++ b/print-cdp.c @@ -69,7 +69,7 @@ cdp_print_string(netdissect_options *ndo, const u_char *cp, const u_int len) { ND_PRINT("'"); - (void)nd_printn(ndo, cp, len, NULL); + nd_printjn(ndo, cp, len); ND_PRINT("'"); } @@ -178,7 +178,7 @@ cdp_print_phys_loc(netdissect_options *ndo, ND_PRINT("0x%02x", GET_U_1(cp)); if (len > 1) { ND_PRINT("/"); - (void)nd_printn(ndo, cp + 1, len - 1, NULL); + nd_printjn(ndo, cp + 1, len - 1); } } diff --git a/print-lldp.c b/print-lldp.c index a0cd9ba4..a04f054e 100644 --- a/print-lldp.c +++ b/print-lldp.c @@ -970,7 +970,7 @@ lldp_private_iana_print(netdissect_options *ndo, switch (subtype) { case LLDP_IANA_SUBTYPE_MUDURL: ND_PRINT("\n\t MUD-URL="); - (void)nd_printn(ndo, tptr+4, tlv_len-4, NULL); + nd_printjn(ndo, tptr+4, tlv_len-4); break; default: hexdump=TRUE; diff --git a/print-lwres.c b/print-lwres.c index c237e482..9a2adf97 100644 --- a/print-lwres.c +++ b/print-lwres.c @@ -194,7 +194,7 @@ lwres_printname(netdissect_options *ndo, size_t l, const u_char *p0) { ND_PRINT(" "); - (void)nd_printn(ndo, p0, l, NULL); + nd_printjn(ndo, p0, l); p0 += l; if (GET_U_1(p0)) ND_PRINT(" (not NUL-terminated!)"); diff --git a/print-olsr.c b/print-olsr.c index 991c8771..c3c90c42 100644 --- a/print-olsr.c +++ b/print-olsr.c @@ -678,7 +678,7 @@ olsr_print(netdissect_options *ndo, else ND_PRINT(", address %s, name \"", GET_IPADDR_STRING(msg_data)); - (void)nd_printn(ndo, msg_data + addr_size, name_entry_len, NULL); + nd_printjn(ndo, msg_data + addr_size, name_entry_len); ND_PRINT("\""); msg_data += addr_size + name_entry_len + name_entry_padding; diff --git a/print-openflow-1.0.c b/print-openflow-1.0.c index d2cc5b9e..61057aad 100644 --- a/print-openflow-1.0.c +++ b/print-openflow-1.0.c @@ -828,7 +828,7 @@ of10_bsn_message_print(netdissect_options *ndo, OF_FWD(4); /* data */ ND_PRINT(", data '"); - (void)nd_printn(ndo, cp, len, NULL); + nd_printjn(ndo, cp, len); ND_PRINT("'"); break; case BSN_SHELL_OUTPUT: @@ -845,7 +845,7 @@ of10_bsn_message_print(netdissect_options *ndo, /* already checked that len >= 4 */ /* data */ ND_PRINT(", data '"); - (void)nd_printn(ndo, cp, len, NULL); + nd_printjn(ndo, cp, len); ND_PRINT("'"); break; case BSN_SHELL_STATUS: diff --git a/print-radius.c b/print-radius.c index c87fa900..6bdcd504 100644 --- a/print-radius.c +++ b/print-radius.c @@ -1135,7 +1135,7 @@ print_attr_operator_name(netdissect_options *ndo, data++; ND_PRINT("[%s] ", tok2str(operator_name_vector, "unknown namespace %u", namespace_value)); - (void)nd_printn(ndo, data, length - 1, NULL); + nd_printjn(ndo, data, length - 1); return; @@ -1183,7 +1183,7 @@ print_attr_location_information(netdissect_options *ndo, data += 8; ND_PRINT("method \""); - (void)nd_printn(ndo, data, length - 20, NULL); + nd_printjn(ndo, data, length - 20); ND_PRINT("\""); return; @@ -1247,7 +1247,7 @@ print_basic_location_policy_rules(netdissect_options *ndo, if (length > 10) { ND_PRINT(", note well \""); - (void)nd_printn(ndo, data, length - 10, NULL); + nd_printjn(ndo, data, length - 10); ND_PRINT("\""); } diff --git a/print-rpki-rtr.c b/print-rpki-rtr.c index 36be3998..d825f30f 100644 --- a/print-rpki-rtr.c +++ b/print-rpki-rtr.c @@ -347,9 +347,8 @@ rpki_rtr_pdu_print(netdissect_options *ndo, const u_char *tptr, const u_int len, if (text_length) { if (pdu_len < tlen + text_length) goto invalid; - /* nd_printn() makes the bounds check */ ND_PRINT("%sError text: ", indent_string(indent+2)); - (void)nd_printn(ndo, tptr + tlen, text_length, NULL); + nd_printjn(ndo, tptr + tlen, text_length); } } break; diff --git a/print-syslog.c b/print-syslog.c index b0e1c91a..916a2f20 100644 --- a/print-syslog.c +++ b/print-syslog.c @@ -139,7 +139,7 @@ syslog_print(netdissect_options *ndo, * beautification to make it clear what was transmitted on the wire. */ if (len > msg_off) - (void)nd_printn(ndo, pptr + msg_off, len - msg_off, NULL); + nd_printjn(ndo, pptr + msg_off, len - msg_off); if (ndo->ndo_vflag > 1) print_unknown_data(ndo, pptr, "\n\t", len); diff --git a/print-udld.c b/print-udld.c index aec1d9e5..40dc0369 100644 --- a/print-udld.c +++ b/print-udld.c @@ -174,7 +174,7 @@ udld_print(netdissect_options *ndo, case UDLD_ECHO_TLV: ND_PRINT(", "); - (void)nd_printn(ndo, tptr, len, NULL); + nd_printjn(ndo, tptr, len); break; case UDLD_MESSAGE_INTERVAL_TLV: |