]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Replace '(void)nd_print()' calls by nd_printjnp() calls
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 11 Dec 2020 09:20:58 +0000 (10:20 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 11 Dec 2020 09:50:25 +0000 (10:50 +0100)
'(void)nd_print(ndo, start, start + len)' are replaced by
'nd_printjnp(ndo, start, len)'

print-hsrp.c
print-openflow-1.0.c
print-openflow-1.3.c
print-vrrp.c
print-wb.c

index 0bcca919bac80d889192cbe159d0ddc8d6ef2709..3027826847a9c84fe9a4df9e22c29ed2ba2b1b8e 100644 (file)
@@ -127,7 +127,7 @@ hsrp_print(netdissect_options *ndo, const u_char *bp, u_int len)
                 * Authentication Data explicitly, but zero padding can be
                 * inferred from the "recommended default value".
                 */
-               (void)nd_print(ndo, hp->hsrp_authdata, hp->hsrp_authdata + HSRP_AUTH_SIZE);
+               nd_printjnp(ndo, hp->hsrp_authdata, HSRP_AUTH_SIZE);
                ND_PRINT("\"");
        }
 }
index aaef064912d02e3bf0387f573619379d8f774a21..d2cc5b9e9cf3fd43225105c9cd17faf6d911ccd1 100644 (file)
@@ -1038,7 +1038,7 @@ of10_phy_port_print(netdissect_options *ndo,
        cp += MAC_ADDR_LEN;
        /* name */
        ND_PRINT(", name '");
-       (void)nd_print(ndo, cp, cp + OFP_MAX_PORT_NAME_LEN);
+       nd_printjnp(ndo, cp, OFP_MAX_PORT_NAME_LEN);
        ND_PRINT("'");
        cp += OFP_MAX_PORT_NAME_LEN;
 
@@ -1670,27 +1670,27 @@ of10_desc_stats_reply_print(netdissect_options *ndo,
                goto invalid;
        /* mfr_desc */
        ND_PRINT("\n\t  mfr_desc '");
-       (void)nd_print(ndo, cp, cp + DESC_STR_LEN);
+       nd_printjnp(ndo, cp, DESC_STR_LEN);
        ND_PRINT("'");
        OF_FWD(DESC_STR_LEN);
        /* hw_desc */
        ND_PRINT("\n\t  hw_desc '");
-       (void)nd_print(ndo, cp, cp + DESC_STR_LEN);
+       nd_printjnp(ndo, cp, DESC_STR_LEN);
        ND_PRINT("'");
        OF_FWD(DESC_STR_LEN);
        /* sw_desc */
        ND_PRINT("\n\t  sw_desc '");
-       (void)nd_print(ndo, cp, cp + DESC_STR_LEN);
+       nd_printjnp(ndo, cp, DESC_STR_LEN);
        ND_PRINT("'");
        OF_FWD(DESC_STR_LEN);
        /* serial_num */
        ND_PRINT("\n\t  serial_num '");
-       (void)nd_print(ndo, cp, cp + SERIAL_NUM_LEN);
+       nd_printjnp(ndo, cp, SERIAL_NUM_LEN);
        ND_PRINT("'");
        OF_FWD(SERIAL_NUM_LEN);
        /* dp_desc */
        ND_PRINT("\n\t  dp_desc '");
-       (void)nd_print(ndo, cp, cp + DESC_STR_LEN);
+       nd_printjnp(ndo, cp, DESC_STR_LEN);
        ND_PRINT("'");
        return;
 
@@ -1803,7 +1803,7 @@ of10_table_stats_reply_print(netdissect_options *ndo,
                OF_FWD(3);
                /* name */
                ND_PRINT(", name '");
-               (void)nd_print(ndo, cp, cp + OFP_MAX_TABLE_NAME_LEN);
+               nd_printjnp(ndo, cp, OFP_MAX_TABLE_NAME_LEN);
                ND_PRINT("'");
                OF_FWD(OFP_MAX_TABLE_NAME_LEN);
                /* wildcards */
index 79de7d7b9999205bf3d9e86bc7fd584ed16e4eb5..9e76ba1b29358fa86b7ac9b6af1d47abb9ee1416 100644 (file)
@@ -661,7 +661,7 @@ of13_port_print(netdissect_options *ndo,
        cp += 2;
        /* name */
        ND_PRINT(", name '");
-       (void)nd_print(ndo, cp, cp + OFP_MAX_PORT_NAME_LEN);
+       nd_printjnp(ndo, cp, OFP_MAX_PORT_NAME_LEN);
        ND_PRINT("'");
        cp += OFP_MAX_PORT_NAME_LEN;
 
index 1a2ff5907eeca95af06d8826a8e6131263fecd91..ee97974ecd438ef4b60b2fb74608889e1154af88 100644 (file)
@@ -170,7 +170,7 @@ vrrp_print(netdissect_options *ndo,
                         * RFC 2338 Section 5.3.10: "If the configured authentication string
                         * is shorter than 8 bytes, the remaining space MUST be zero-filled.
                         */
-                       (void)nd_print(ndo, bp, bp + 8);
+                       nd_printjnp(ndo, bp, 8);
                        ND_PRINT("\"");
                }
        }
index 184809cb9412dc6c985a966b60d0623878cdbbf4..35b5a196d8bfe6096a9711fe8c4e612db01c6009 100644 (file)
@@ -232,7 +232,7 @@ wb_id(netdissect_options *ndo,
                c = ',';
        }
        ND_PRINT("> \"");
-       (void)nd_print(ndo, sitename, sitename + len);
+       nd_printjnp(ndo, sitename, len);
        ND_PRINT("\"");
        return (0);
 }