diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-01-16 20:51:21 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-01-16 20:51:21 +0000 |
commit | 8d32d2066a22a6e3b3970961af9fb9a2a64c2ae6 (patch) | |
tree | 420d5401a47ed145c8aba98c7891e5f098f86e19 /epan/dissectors/packet-srvloc.c | |
parent | c04dd5fda9af1d2fdac3eb2d16b7e6de757558a9 (diff) | |
download | wireshark-8d32d2066a22a6e3b3970961af9fb9a2a64c2ae6.tar.gz wireshark-8d32d2066a22a6e3b3970961af9fb9a2a64c2ae6.tar.bz2 wireshark-8d32d2066a22a6e3b3970961af9fb9a2a64c2ae6.zip |
There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().
Replace some tvb_get_ptr()s with tvb_get_ephemeral_string() or
tvb_get_const_stringz().
Use tvb_memeql() & tvb_memcmp().
svn path=/trunk/; revision=35558
Diffstat (limited to 'epan/dissectors/packet-srvloc.c')
-rw-r--r-- | epan/dissectors/packet-srvloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-srvloc.c b/epan/dissectors/packet-srvloc.c index b18eb0f60e..349e3d7051 100644 --- a/epan/dissectors/packet-srvloc.c +++ b/epan/dissectors/packet-srvloc.c @@ -448,7 +448,7 @@ add_v1_string(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length, static guint8* unicode_to_bytes(tvbuff_t *tvb, int offset, int length, gboolean endianness) { - const guint8 *ascii_text = tvb_get_ptr(tvb, offset, length); + const guint8 *ascii_text = tvb_get_ephemeral_string(tvb, offset, length); int i, j=0; guint8 c_char, c_char1; guint8 *byte_array; @@ -632,7 +632,7 @@ attr_list(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length, break; case CHARSET_UTF_8: - type_len = (int)strcspn(tvb_get_ptr(tvb, offset, length), "="); + type_len = (int)strcspn(tvb_get_ephemeral_string(tvb, offset, length), "="); attr_type = unicode_to_bytes(tvb, offset+1, type_len-1, FALSE); proto_tree_add_string(tree, hf, tvb, offset+1, type_len-1, attr_type); i=1; |