diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-06 18:25:23 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-06 18:25:23 +0000 |
commit | 0e5cef61be28b595269433c50b23ce71a24b9fd3 (patch) | |
tree | 3906bcb3782e7eeaccdf0142093b63c249a57593 /epan/expert.c | |
parent | d6122ad4223c0616f3ac12b96f079f04cd83d3c4 (diff) | |
download | wireshark-0e5cef61be28b595269433c50b23ce71a24b9fd3.tar.gz wireshark-0e5cef61be28b595269433c50b23ce71a24b9fd3.tar.bz2 wireshark-0e5cef61be28b595269433c50b23ce71a24b9fd3.zip |
Split a bunch of init routines into init() and cleanup(). This allows us to free memory properly on shutdown.
This is an initial step. There's still some work to do.
svn path=/trunk/; revision=29754
Diffstat (limited to 'epan/expert.c')
-rw-r--r-- | epan/expert.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/expert.c b/epan/expert.c index bd66d8daaf..0b25440f16 100644 --- a/epan/expert.c +++ b/epan/expert.c @@ -68,8 +68,6 @@ const value_string expert_severity_vals[] = { { 0, NULL } }; - - void expert_init(void) { @@ -77,10 +75,10 @@ expert_init(void) { &hf_expert_msg, { "Message", "expert.message", FT_STRING, BASE_NONE, NULL, 0, "Wireshark expert information", HFILL } }, - { &hf_expert_group, + { &hf_expert_group, { "Group", "expert.group", FT_UINT32, BASE_NONE, VALS(expert_group_vals), 0, "Wireshark expert group", HFILL } }, - { &hf_expert_severity, + { &hf_expert_severity, { "Severity level", "expert.severity", FT_UINT32, BASE_NONE, VALS(expert_severity_vals), 0, "Wireshark expert severity level", HFILL } } }; @@ -118,7 +116,7 @@ expert_get_highest_severity(void) } -/* set's the PI_ flags to a protocol item +/* set's the PI_ flags to a protocol item * (and it's parent items till the toplevel) */ static void expert_set_item_flags(proto_item *pi, int group, int severity) @@ -138,7 +136,7 @@ expert_create_tree(proto_item *pi, int group, int severity, const char *msg) proto_item *ti; tree = proto_item_add_subtree(pi, ett_expert); - ti = proto_tree_add_protocol_format(tree, proto_expert, NULL, 0, 0, "Expert Info (%s/%s): %s", + ti = proto_tree_add_protocol_format(tree, proto_expert, NULL, 0, 0, "Expert Info (%s/%s): %s", val_to_str(severity, expert_severity_vals, "?%u?"), val_to_str(group, expert_group_vals, "?%u?"), msg); |