aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2008-12-19 17:39:52 +0000
committerGerald Combs <gerald@wireshark.org>2008-12-19 17:39:52 +0000
commit6d04f793f019b456f8d8c81f231152fbba24da8b (patch)
tree647f2501114c1f15b0c01fc84cbb6cdad96a3580 /epan/proto.c
parent8e53f726885fe5ce2ae8422867299d2da09518cc (diff)
Back out r27047 and r27053.
svn path=/trunk/; revision=27062
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 18c358bad2..f0bfb1091f 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1489,27 +1489,15 @@ proto_tree_add_bytes_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
proto_item *
proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const char *format, ...)
+ gint length, const guint8 *start_ptr, const char *format, ...)
{
proto_item *pi;
- field_info *new_fi;
- header_field_info *hfinfo;
va_list ap;
- if (!tree)
- return (NULL);
-
- TRY_TO_FAKE_THIS_ITEM(tree, hfindex);
-
- PROTO_REGISTRAR_GET_NTH(hfindex, hfinfo);
- DISSECTOR_ASSERT(hfinfo->type == FT_BYTES);
-
- pi = proto_tree_add_pi(tree, hfindex, tvb, start, &length, &new_fi);
+ pi = proto_tree_add_bytes(tree, hfindex, tvb, start, length, start_ptr);
if (pi == NULL)
return (NULL);
- proto_tree_set_bytes_tvb(new_fi, tvb, start, length);
-
va_start(ap, format);
proto_tree_set_representation(pi, format, ap);
va_end(ap);