diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2017-02-19 15:54:55 +0100 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2017-02-19 16:15:52 +0000 |
commit | dc173f97c0701ddaf4bd978c3b02225b69ea1d4d (patch) | |
tree | 31f928a807113afb9530062304dc3b1040ed840b /ui/cli | |
parent | ef20188bf6b7170cef5f0d0b86f929f74e852dc4 (diff) | |
download | wireshark-dc173f97c0701ddaf4bd978c3b02225b69ea1d4d.tar.gz |
tap: use g_new0() instead of g_new() and memset()
Change-Id: Ib6b7424ac38a08efebc3b86aca4dc6641f6c7585
Reviewed-on: https://code.wireshark.org/review/20178
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'ui/cli')
-rw-r--r-- | ui/cli/tap-expert.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ui/cli/tap-expert.c b/ui/cli/tap-expert.c index 07fdfb5f6c..c5113918d2 100644 --- a/ui/cli/tap-expert.c +++ b/ui/cli/tap-expert.c @@ -234,10 +234,8 @@ static void expert_stat_init(const char *opt_arg, void *userdata _U_) } } - /* Create top-level struct */ - hs = g_new(expert_tapdata_t, 1); - memset(hs, 0, sizeof(expert_tapdata_t)); + hs = g_new0(expert_tapdata_t, 1); /* Allocate chunk of strings */ hs->text = g_string_chunk_new(100); |