aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wbxml.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2011-01-16 20:51:21 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2011-01-16 20:51:21 +0000
commit8d32d2066a22a6e3b3970961af9fb9a2a64c2ae6 (patch)
tree420d5401a47ed145c8aba98c7891e5f098f86e19 /epan/dissectors/packet-wbxml.c
parentc04dd5fda9af1d2fdac3eb2d16b7e6de757558a9 (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-wbxml.c')
-rw-r--r--epan/dissectors/packet-wbxml.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/epan/dissectors/packet-wbxml.c b/epan/dissectors/packet-wbxml.c
index e861d5ec85..db96366154 100644
--- a/epan/dissectors/packet-wbxml.c
+++ b/epan/dissectors/packet-wbxml.c
@@ -1200,27 +1200,24 @@ static value_string_ext vals_wbxml1x_global_tokens_ext = VALUE_STRING_EXT_INIT(v
static char *
ext_t_0_wml_10(tvbuff_t *tvb, guint32 value, guint32 str_tbl)
{
- gint str_len = tvb_strsize (tvb, str_tbl + value);
char *str = g_strdup_printf("Variable substitution - escaped: '%s'",
- tvb_get_ptr(tvb, str_tbl + value, str_len));
+ tvb_get_const_stringz(tvb, str_tbl + value, NULL));
return str;
}
static char *
ext_t_1_wml_10(tvbuff_t *tvb, guint32 value, guint32 str_tbl)
{
- gint str_len = tvb_strsize (tvb, str_tbl + value);
char *str = g_strdup_printf("Variable substitution - unescaped: '%s'",
- tvb_get_ptr(tvb, str_tbl + value, str_len));
+ tvb_get_const_stringz(tvb, str_tbl + value, NULL));
return str;
}
static char *
ext_t_2_wml_10(tvbuff_t *tvb, guint32 value, guint32 str_tbl)
{
- gint str_len = tvb_strsize (tvb, str_tbl + value);
char *str = g_strdup_printf("Variable substitution - no transformation: '%s'",
- tvb_get_ptr(tvb, str_tbl + value, str_len));
+ tvb_get_const_stringz(tvb, str_tbl + value, NULL));
return str;
}
/***** Global extension tokens *****/
@@ -3029,7 +3026,7 @@ static const value_string wbxml_mssyncc10_tags_cp2[] = { /* ActiveSync POOMMAIL
{ 0x0c, "Body" },
{ 0x0d, "BodySize" },
{ 0x0e, "BodyTruncated" },
- { 0x0f, "DateReceived" },
+ { 0x0f, "DateReceived" },
{ 0x10, "DisplayName" },
{ 0x11, "DisplayTo" },
{ 0x12, "Importance" },