]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use more the EXTRACT_U_1() macro (38/n)
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 1 Dec 2017 09:27:42 +0000 (10:27 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 1 Dec 2017 09:27:42 +0000 (10:27 +0100)
In some ND_ISPRINT() macro calls.

print-rip.c
print-snmp.c

index 89ca887d53909e3c56b21db57c8ea8dd4a241562..aae66f556fe1de06ba4017dbec2e5e0b00c3ab0e 100644 (file)
@@ -139,7 +139,7 @@ rip_entry_print_v2(netdissect_options *ndo,
                        ND_PRINT((ndo, "\n\t  Simple Text Authentication data: "));
                        for (; i < RIP_AUTHLEN; p++, i++)
                                ND_PRINT((ndo, "%c",
-                                        ND_ISPRINT(*p) ? EXTRACT_U_1(p) : '.'));
+                                        ND_ISPRINT(EXTRACT_U_1(p)) ? EXTRACT_U_1(p) : '.'));
                } else if (auth_type == 3) {
                        ND_PRINT((ndo, "\n\t  Auth header:"));
                        ND_PRINT((ndo, " Packet Len %u,", EXTRACT_BE_U_2((const uint8_t *)ni + 4)));
index 7a0332780c634fc228ded444123320a40ec7f771..fdb3499dc65e6ffb33060123eff82a63fb9f0de0 100644 (file)
@@ -701,7 +701,7 @@ asn1_print_string(netdissect_options *ndo, struct be *elem)
        p = elem->data.str;
        ND_TCHECK2(*p, asnlen);
        for (i = asnlen; printable && i-- > 0; p++)
-               printable = ND_ISPRINT(*p);
+               printable = ND_ISPRINT(EXTRACT_U_1(p));
        p = elem->data.str;
        if (printable) {
                ND_PRINT((ndo, "\""));