diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-01-20 03:49:44 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-01-20 03:49:44 +0000 |
commit | b379f080cb32564edd315f448fe9e0c0a495ad3e (patch) | |
tree | c9b44bf334fd6a1596e7ac2929476a05a22c979d /epan/dissectors/packet-dcp-etsi.c | |
parent | 3317c6757a020ebd6706a02561c1079e4e3796d5 (diff) |
Roll some calls to tvb_get_ptr() into proto_tree_add_bytes_format() (instead
of going through a temporary variable). This just makes it more obvious which
add_bytes_format() calls are or are not being given pointers into the TVB.
Use tvb_ip_to_str() and tvb_ip6_to_str() in a couple spots.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35593 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-dcp-etsi.c')
-rw-r--r-- | epan/dissectors/packet-dcp-etsi.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-dcp-etsi.c b/epan/dissectors/packet-dcp-etsi.c index 439f5c7321..a5c965ed9a 100644 --- a/epan/dissectors/packet-dcp-etsi.c +++ b/epan/dissectors/packet-dcp-etsi.c @@ -167,7 +167,7 @@ dissect_dcp_etsi (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) * * 7.1 PFT fragment structure * PFT Header - * 14, 16, 18 or 20 bytes (depending on options) Optional present if FEC=1 Optional present if Addr = 1 + * 14, 16, 18 or 20 bytes (depending on options) Optional present if FEC=1 Optional present if Addr = 1 * Psync Pseq Findex Fcount FEC HCRC Addr Plen | RSk RSz | Source Dest * 16 bits 16 bits 24 bits 24 bits 1 bit 16 bits 1 bit 14 bits | 8 bits 8 bits | 16 bits 16 bits * @@ -323,7 +323,7 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, } for(; current_findex<next_fragment_we_have; current_findex++) { frag = fragment_add_seq_check (dummytvb, 0, pinfo, seq, - dcp_fragment_table, dcp_reassembled_table, + dcp_fragment_table, dcp_reassembled_table, current_findex, plen, (current_findex+1!=fcount)); } current_findex++; /* skip over the fragment we have */ @@ -642,16 +642,17 @@ dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) bytes++; if(tree) { proto_item *i = NULL; - const guint8 *p = tvb_get_ptr(tvb, offset, bytes); if(strcmp(tag, "*ptr")==0) { prot = (char*)tvb_get_ephemeral_string (tvb, offset, 4); maj = tvb_get_ntohs(tvb, offset+4); min = tvb_get_ntohs(tvb, offset+6); i = proto_tree_add_bytes_format(tpl_tree, hf_tpl_tlv, tvb, - offset-8, bytes+8, p, "%s %s rev %d.%d", tag, prot, maj, min); + offset-8, bytes+8, tvb_get_ptr(tvb, offset, bytes), + "%s %s rev %d.%d", tag, prot, maj, min); } else { i = proto_tree_add_bytes_format(tpl_tree, hf_tpl_tlv, tvb, - offset-8, bytes+8, p, "%s (%u bits)", tag, bits); + offset-8, bytes+8, tvb_get_ptr(tvb, offset, bytes), + "%s (%u bits)", tag, bits); } } offset += bytes; |