summaryrefslogtreecommitdiff
path: root/print-snmp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-12-04 20:21:48 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-12-04 21:00:57 +0100
commit451ac4c753933eca8ffd5fd5192a03334520d789 (patch)
treed1b8f8cf57053464010b9edcf0d2f59cec8f1514 /print-snmp.c
parent00b189d27cd235c958497d9b1aca6d3addd55d43 (diff)
downloadtcpdump-451ac4c753933eca8ffd5fd5192a03334520d789.tar.gz
Use more the ND_TCHECK_1() macro
Diffstat (limited to 'print-snmp.c')
-rw-r--r--print-snmp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/print-snmp.c b/print-snmp.c
index fdb3499d..0c90132b 100644
--- a/print-snmp.c
+++ b/print-snmp.c
@@ -429,7 +429,7 @@ asn1_parse(netdissect_options *ndo,
ND_PRINT((ndo, "[nothing to parse]"));
return -1;
}
- ND_TCHECK(*p);
+ ND_TCHECK_1(p);
/*
* it would be nice to use a bit field, but you can't depend on them.
@@ -464,7 +464,7 @@ asn1_parse(netdissect_options *ndo,
* that won't fit in 32 bits.
*/
id = 0;
- ND_TCHECK(*p);
+ ND_TCHECK_1(p);
while (EXTRACT_U_1(p) & ASN_BIT8) {
if (len < 1) {
ND_PRINT((ndo, "[Xtagfield?]"));
@@ -474,13 +474,13 @@ asn1_parse(netdissect_options *ndo,
len--;
hdr++;
p++;
- ND_TCHECK(*p);
+ ND_TCHECK_1(p);
}
if (len < 1) {
ND_PRINT((ndo, "[Xtagfield?]"));
return -1;
}
- ND_TCHECK(*p);
+ ND_TCHECK_1(p);
elem->id = id = (id << 7) | EXTRACT_U_1(p);
--len;
++hdr;
@@ -490,7 +490,7 @@ asn1_parse(netdissect_options *ndo,
ND_PRINT((ndo, "[no asnlen]"));
return -1;
}
- ND_TCHECK(*p);
+ ND_TCHECK_1(p);
elem->asnlen = *p;
p++; len--; hdr++;
if (elem->asnlen & ASN_BIT8) {
@@ -770,7 +770,7 @@ asn1_print(netdissect_options *ndo,
}
for (; i-- > 0; p++) {
- ND_TCHECK(*p);
+ ND_TCHECK_1(p);
o = (o << ASN_SHIFT7) + (*p & ~ASN_BIT8);
if (*p & ASN_LONGLEN)
continue;
@@ -922,7 +922,7 @@ smi_decode_oid(netdissect_options *ndo,
unsigned int firstval;
for (*oidlen = 0; i-- > 0; p++) {
- ND_TCHECK(*p);
+ ND_TCHECK_1(p);
o = (o << ASN_SHIFT7) + (*p & ~ASN_BIT8);
if (*p & ASN_LONGLEN)
continue;