From: Francois-Xavier Le Bail Date: Fri, 1 Dec 2017 09:27:42 +0000 (+0100) Subject: Use more the EXTRACT_U_1() macro (38/n) X-Git-Tag: tcpdump-4.99-bp~1689 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/7199dd316fde2a4705cb122863f5f58eb5aa0752 Use more the EXTRACT_U_1() macro (38/n) In some ND_ISPRINT() macro calls. --- diff --git a/print-rip.c b/print-rip.c index 89ca887d..aae66f55 100644 --- a/print-rip.c +++ b/print-rip.c @@ -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))); diff --git a/print-snmp.c b/print-snmp.c index 7a033278..fdb3499d 100644 --- a/print-snmp.c +++ b/print-snmp.c @@ -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, "\""));