diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-07-15 13:59:23 -0700 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2016-07-21 20:09:03 +0000 |
commit | 913e0f408c48f3baf6933807f9cfe4195fde5c75 (patch) | |
tree | 285e4dd8b2e5c660bc04b0256323de6622082a10 /epan/expert.c | |
parent | 97d194cd3cb7fa3806a7bb83f83f06ee2eda418b (diff) |
Use Windows CRT string functions in some places.
Copy wsutil/wsprintf.h from change 16537. Update it to use functions
appropriate to Visual C++ >= 2015, < 2015, and everything else. Add
notes about specific API issues.
Update epan/expert.c to use ws_snprintf, since the VS profiler shows it
as a minor hot spot. This reduces load time for a large-ish capture from
~14s to ~12s here.
Migrate a previous column-utils change.
Change-Id: Id4064b7c06c35fd447b63c73f731afee181df4f9
Reviewed-on: https://code.wireshark.org/review/16483
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: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/expert.c')
-rw-r--r-- | epan/expert.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/expert.c b/epan/expert.c index b45541da2e..75e5981978 100644 --- a/epan/expert.c +++ b/epan/expert.c @@ -27,6 +27,8 @@ #include <stdio.h> #include <stdlib.h> +#include <wsutil/ws_printf.h> + #include "packet.h" #include "expert.h" #include "uat.h" @@ -539,7 +541,7 @@ expert_set_info_vformat(packet_info *pinfo, proto_item *pi, int group, int sever } if (use_vaformat) { - g_vsnprintf(formatted, ITEM_LABEL_LENGTH, format, ap); + ws_vsnprintf(formatted, ITEM_LABEL_LENGTH, format, ap); } else { g_strlcpy(formatted, format, ITEM_LABEL_LENGTH); } |