aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mgcp.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames@darkjames.pl>2014-05-18 09:56:20 +0200
committerEvan Huus <eapache@gmail.com>2014-05-19 02:27:12 +0000
commitd7bd2ecf9fc2c627d236484cee8e77e84697da07 (patch)
tree61d077a4d18f23569dd3beb7596beb242962fe70 /epan/dissectors/packet-mgcp.c
parente6d6183e1bee841fa65619ddd61329c7ea91b3f7 (diff)
Add new proto_tree_add_format_text() function
There are lot of text dissectors which want just to add escaped (not filtrable) text, add new function proto_tree_add_format_text() which just do this in optimized way. Change-Id: Ia0e189b620cc0a5b74cfdaef1ad4571d766bb2ab Reviewed-on: https://code.wireshark.org/review/1678 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mgcp.c')
-rw-r--r--epan/dissectors/packet-mgcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c
index 7f3655d022..82d1e072bc 100644
--- a/epan/dissectors/packet-mgcp.c
+++ b/epan/dissectors/packet-mgcp.c
@@ -566,8 +566,7 @@ static void mgcp_raw_text_add(tvbuff_t *tvb, proto_tree *tree)
{
tvb_find_line_end(tvb,tvb_linebegin,-1,&tvb_lineend,FALSE);
linelen = tvb_lineend - tvb_linebegin;
- proto_tree_add_text(tree, tvb, tvb_linebegin, linelen, "%s",
- tvb_format_text(tvb, tvb_linebegin, linelen));
+ proto_tree_add_format_text(tree, tvb, tvb_linebegin, linelen);
tvb_linebegin = tvb_lineend;
} while (tvb_lineend < tvb_len);
}