diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-02 14:19:13 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-03 13:35:26 +0100 |
commit | 61c422a88caefe986c2bc0a7f2f3028f696fa5cd (patch) | |
tree | 2cad95b84bee697060ff33c4e649662b2d19624c /print-hncp.c | |
parent | a5bb53dd7407207c012d901789d68e4b8a7054cf (diff) | |
download | tcpdump-61c422a88caefe986c2bc0a7f2f3028f696fa5cd.tar.gz |
Use more the EXTRACT_U_1() macro (43/n)
In: if (... p[n] ...) ...
Diffstat (limited to 'print-hncp.c')
-rw-r--r-- | print-hncp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/print-hncp.c b/print-hncp.c index f6168fa6..559c7032 100644 --- a/print-hncp.c +++ b/print-hncp.c @@ -614,7 +614,7 @@ hncp_print_rec(netdissect_options *ndo, case HNCP_DELEGATED_PREFIX: { int l; - if (bodylen < 9 || bodylen < 9 + (value[8] + 7) / 8) { + if (bodylen < 9 || bodylen < 9 + (EXTRACT_U_1(value + 8) + 7) / 8) { ND_PRINT((ndo, " %s", istr)); break; } @@ -725,7 +725,7 @@ hncp_print_rec(netdissect_options *ndo, case HNCP_ASSIGNED_PREFIX: { uint8_t prty; int l; - if (bodylen < 6 || bodylen < 6 + (value[5] + 7) / 8) { + if (bodylen < 6 || bodylen < 6 + (EXTRACT_U_1(value + 5) + 7) / 8) { ND_PRINT((ndo, " %s", istr)); break; } |