diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2012-12-02 04:49:13 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2012-12-02 04:49:13 +0000 |
commit | 49466f95bc1fe3cc139f3750fcc934ffc210faef (patch) | |
tree | 14c72b7db9d4fe0af875d373d6023c92bae0463a /epan/dissectors/packet-arcnet.c | |
parent | da4442d6384b15530fd740295080a8ad3a145ca6 (diff) | |
download | wireshark-49466f95bc1fe3cc139f3750fcc934ffc210faef.tar.gz |
Introduce, and start using, TVB_SET_ADDRESS() and TVB_SET_ADDRESS_HF(). They
are like the non-TVB versions except that they take a TVB and an offset
instead of (frequently) a pointer into the TVB.
Calling tvb_get_ptr() before modifying the rest of the fields should help fix
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7960 (though I can't
reproduce that problem).
Replace a bunch of calls like:
SET_ADDRESS(..., AT_XXX, length, tvb_get_ptr(tvb, offset, length));
with:
TVB_SET_ADDRESS(..., AT_XXX, tvb, offset, length);
svn path=/trunk/; revision=46324
Diffstat (limited to 'epan/dissectors/packet-arcnet.c')
-rw-r--r-- | epan/dissectors/packet-arcnet.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-arcnet.c b/epan/dissectors/packet-arcnet.c index 348833b25c..156661e72e 100644 --- a/epan/dissectors/packet-arcnet.c +++ b/epan/dissectors/packet-arcnet.c @@ -142,10 +142,10 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, src = tvb_get_guint8 (tvb, 0); dst = tvb_get_guint8 (tvb, 1); - SET_ADDRESS(&pinfo->dl_src, AT_ARCNET, 1, tvb_get_ptr(tvb, 0, 1)); - SET_ADDRESS(&pinfo->src, AT_ARCNET, 1, tvb_get_ptr(tvb, 0, 1)); - SET_ADDRESS(&pinfo->dl_dst, AT_ARCNET, 1, tvb_get_ptr(tvb, 1, 1)); - SET_ADDRESS(&pinfo->dst, AT_ARCNET, 1, tvb_get_ptr(tvb, 1, 1)); + TVB_SET_ADDRESS(&pinfo->dl_src, AT_ARCNET, tvb, 0, 1); + TVB_SET_ADDRESS(&pinfo->src, AT_ARCNET, tvb, 0, 1); + TVB_SET_ADDRESS(&pinfo->dl_dst, AT_ARCNET, tvb, 1, 1); + TVB_SET_ADDRESS(&pinfo->dst, AT_ARCNET, tvb, 1, 1); ti = proto_tree_add_item (tree, proto_arcnet, tvb, 0, -1, ENC_NA); |