diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-01-16 03:46:16 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-01-16 03:46:16 +0000 |
commit | 8fd8145c312e76ea9cb95c14914c8817bd315a8d (patch) | |
tree | d425f254e94d747cc030227516704d5e0f6123a9 /epan/dissectors/packet-afp.c | |
parent | 357e335a9d3ca043c9bf08701399cf650fa666a0 (diff) |
Use tvb_memeql().
Use tvb_ip_to_str().
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()s to ensure the
return string is NULL terminated.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35547 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-afp.c')
-rw-r--r-- | epan/dissectors/packet-afp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c index c8b9cd0e8b..0699dd095e 100644 --- a/epan/dissectors/packet-afp.c +++ b/epan/dissectors/packet-afp.c @@ -2474,7 +2474,7 @@ dissect_query_afp_login(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_tree_add_item(tree, hf_afp_AFPVersion, tvb, offset, 1,FALSE); offset += len +1; len_uam = tvb_get_guint8(tvb, offset); - uam = tvb_get_ptr(tvb, offset +1, len_uam); + uam = tvb_get_ephemeral_string(tvb, offset +1, len_uam); proto_tree_add_item(tree, hf_afp_UAM, tvb, offset, 1,FALSE); offset += len_uam +1; @@ -2509,7 +2509,7 @@ dissect_query_afp_login_ext(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t offset += len +1; len_uam = tvb_get_guint8(tvb, offset); - uam = tvb_get_ptr(tvb, offset +1, len_uam); + uam = tvb_get_ephemeral_string(tvb, offset +1, len_uam); proto_tree_add_item(tree, hf_afp_UAM, tvb, offset, 1,FALSE); offset += len_uam +1; |