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-mysql.c | |
parent | c04dd5fda9af1d2fdac3eb2d16b7e6de757558a9 (diff) |
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-mysql.c')
-rw-r--r-- | epan/dissectors/packet-mysql.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c index 524e0bfce1..0e99d4392d 100644 --- a/epan/dissectors/packet-mysql.c +++ b/epan/dissectors/packet-mysql.c @@ -1313,7 +1313,7 @@ mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, " version=%s", - tvb_get_ptr(tvb, offset, strlen)); + tvb_get_ephemeral_string(tvb, offset, strlen)); } proto_tree_add_item(greeting_tree, hf_mysql_version, tvb, offset, strlen, FALSE ); @@ -1410,7 +1410,7 @@ mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset, strlen= my_tvb_strsize(tvb, offset); if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, " user=%s", - tvb_get_ptr(tvb,offset,strlen)); + tvb_get_ephemeral_string(tvb,offset,strlen)); } proto_tree_add_item(login_tree, hf_mysql_user, tvb, offset, strlen, FALSE ); |