]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Replace the (void)nd_printn(..., NULL) calls by nd_printjn() calls
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 8 Jan 2021 15:21:39 +0000 (16:21 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 8 Jan 2021 16:12:12 +0000 (17:12 +0100)
Moreover:
Remove a now useless comment.

13 files changed:
print-aoe.c
print-bfd.c
print-bgp.c
print-bootp.c
print-cdp.c
print-lldp.c
print-lwres.c
print-olsr.c
print-openflow-1.0.c
print-radius.c
print-rpki-rtr.c
print-syslog.c
print-udld.c

index 0cd4299a7a6bf7b6ae205f0692b3727899c12ac7..9704fd87ed56823f0b5709312741db0aed63e60b 100644 (file)
@@ -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;
 
index 8c047357db3ed65ffc262ae2723c2e70be86a75c..e28046e7d0e1d0a98e921d93acfb3bb95d6ffc94 100644 (file)
@@ -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:
index 9688a4edb4f1fa11a76233273f985491d1acf3ed..a20953726df5572eae27c97e78d241106ffb755e 100644 (file)
@@ -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;
             }
index 64b68e2638bba46ea7ae04290b2463b73a0dc822..8449f0ff9ade8f7857bd311eb94fc0186a0ac296 100644 (file)
@@ -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++;
index 9f5c24bca6bd375aa3431ac287a46f282e85d61b..157e5ed5fa2ae605ee07e6854002f3ed0a0ed507 100644 (file)
@@ -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);
        }
 }
 
index a0cd9ba480042a2bc9840bdb3d4348a39d7dca5c..a04f054ed48372655a849df00b09e61eb3ab762b 100644 (file)
@@ -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;
index c237e482a01e6882571767ce13d28fb05cecca0b..9a2adf97b0efaa2592ba590cff19c750c6fad502 100644 (file)
@@ -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!)");
index 991c87710192da7f0f014d8a2eed85732b60f847..c3c90c42d64773afa761f156ad2bd24176deecb0 100644 (file)
@@ -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;
index d2cc5b9e9cf3fd43225105c9cd17faf6d911ccd1..61057aad368efaca9103fcf69b409fcb9a32bb44 100644 (file)
@@ -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:
index c87fa900f392e9a32f84d55ad83130315182cb41..6bdcd504822ae8bb149e1cc80e197f575f75543e 100644 (file)
@@ -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("\"");
    }
 
index 36be3998a32626cd82c26102709c2ce63038c93e..d825f30f0b3645d961ce5e4a9b5122d315150977 100644 (file)
@@ -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;
index b0e1c91aa78457ebdc5b560900417d5be393d112..916a2f200c82523f1ffb4fd6416eadc9a64590fc 100644 (file)
@@ -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);
index aec1d9e5727894e9f282116dbc2f71c976d46980..40dc03697b1df80b22bf23d027bb502fa1458675 100644 (file)
@@ -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: