diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-02 14:56:12 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-02 20:52:22 +0100 |
commit | e83dfd9b161eeb2bde1a42b5e3f2fc83639d54f3 (patch) | |
tree | 15fa846fd58436649c3e6ca5410ac4f86ce89ecd /print-hncp.c | |
parent | 2d20acd7420ab5b8d90f9921185a506a3a2f1c4a (diff) | |
download | tcpdump-e83dfd9b161eeb2bde1a42b5e3f2fc83639d54f3.tar.gz |
Simplify some expressions
This will also help some future scripted code updates.
Diffstat (limited to 'print-hncp.c')
-rw-r--r-- | print-hncp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/print-hncp.c b/print-hncp.c index 676ff278..f6168fa6 100644 --- a/print-hncp.c +++ b/print-hncp.c @@ -221,7 +221,7 @@ print_prefix(netdissect_options *ndo, const u_char *prefix, u_int max_length) plenbytes = (plen + 7) / 8; if (max_length < (u_int)plenbytes + IPV4_MAPPED_HEADING_LEN) return -3; - memcpy(&addr, &prefix[1 + IPV4_MAPPED_HEADING_LEN], plenbytes); + memcpy(&addr, prefix + IPV4_MAPPED_HEADING_LEN + 1, plenbytes); if (plen % 8) { ((u_char *)&addr)[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); |