diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-04-01 12:48:22 -0700 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-04-02 18:30:56 +0000 |
commit | 232e7474e60fb3cdaf89ad8306c5590e046e9888 (patch) | |
tree | 7138869b545a1bec5b9966a8b70091cab134e7a7 /epan/dissectors/packet-diameter.c | |
parent | 9328eb62346986d4dbb19e0fdf28bdb2842df63b (diff) |
Use faster wmem_str* functions in a few places.
Use wmem_strdup and wmem_strconcat instead of wmem_strdup_printf.
This shaves a small amount of time off of register_all_protocols on
Windows according to the Visual Studio profiler.
Change-Id: Ib6991e8de5b4fc30e960c513a3028c09dfe6a0a4
Reviewed-on: https://code.wireshark.org/review/14770
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-diameter.c')
-rw-r--r-- | epan/dissectors/packet-diameter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c index 632e1e6eee..46c0037bb6 100644 --- a/epan/dissectors/packet-diameter.c +++ b/epan/dissectors/packet-diameter.c @@ -1593,8 +1593,8 @@ basic_avp_reginfo(diam_avp_t *a, const char *name, enum ftenum ft, /* HFILL */ HFILL_INIT(hf); - hf.hfinfo.name = wmem_strdup_printf(wmem_epan_scope(), "%s",name); - hf.hfinfo.abbrev = alnumerize(wmem_strdup_printf(wmem_epan_scope(), "diameter.%s",name)); + hf.hfinfo.name = wmem_strdup(wmem_epan_scope(), name); + hf.hfinfo.abbrev = alnumerize(wmem_strconcat(wmem_epan_scope(), "diameter.", name, NULL)); if (vs_ext) { hf.hfinfo.strings = vs_ext; } |