diff options
author | Evan Huus <eapache@gmail.com> | 2013-07-05 23:53:25 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-07-05 23:53:25 +0000 |
commit | 34cd52a8e5f0515947cb9a08041ba8ed7a3be88f (patch) | |
tree | 6fbf58e721e7db225344160e754b82db512e62ec /epan/expert.c | |
parent | 7fb1b4ab37ec14f0cc6e726750381aab5bc60b89 (diff) |
Fix the use of va_args in the new expert code. Passing a va_list to a ... is
valid, but doesn't do what you actually want most of the time.
svn path=/trunk/; revision=50392
Diffstat (limited to 'epan/expert.c')
-rw-r--r-- | epan/expert.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/expert.c b/epan/expert.c index 68ba38be01..7a51891ff7 100644 --- a/epan/expert.c +++ b/epan/expert.c @@ -437,9 +437,13 @@ proto_tree_add_expert_format(proto_tree *tree, packet_info *pinfo, expert_field* EXPERT_REGISTRAR_GET_NTH(expindex->ei, eiinfo); va_start(ap, format); - ti = proto_tree_add_text(tree, tvb, start, length, format, ap); + ti = proto_tree_add_text_valist(tree, tvb, start, length, format, ap); + va_end(ap); + + va_start(ap, format); expert_set_info_vformat(pinfo, ti, eiinfo->group, eiinfo->severity, *eiinfo->hf_info.p_id, TRUE, format, ap); va_end(ap); + return ti; } |