Use more the EXTRACT_U_1() macro (40/n)

In some macros and functions calls.
p[n], unsigned char *p.
This commit is contained in:
Francois-Xavier Le Bail 2017-12-01 22:35:28 +01:00
parent 505cd1fe15
commit d7b497cac7
2 changed files with 2 additions and 2 deletions

View File

@ -2262,7 +2262,7 @@ ikev2_ID_print(netdissect_options *ndo, u_char tpay,
ND_TCHECK2(*typedata, idtype_len);
for(i=0; i<idtype_len; i++) {
if(ND_ISPRINT(EXTRACT_U_1(typedata + i))) {
ND_PRINT((ndo, "%c", typedata[i]));
ND_PRINT((ndo, "%c", EXTRACT_U_1(typedata + i)));
} else {
ND_PRINT((ndo, "."));
}

View File

@ -282,7 +282,7 @@ smb_print_data(netdissect_options *ndo, const unsigned char *buf, int len)
ND_PRINT((ndo, "[%03X] ", i));
for (i = 0; i < len; /*nothing*/) {
ND_TCHECK(buf[i]);
ND_PRINT((ndo, "%02X ", buf[i] & 0xff));
ND_PRINT((ndo, "%02X ", EXTRACT_U_1(buf + i) & 0xff));
i++;
if (i%8 == 0)
ND_PRINT((ndo, " "));