dissect_opts: use a better name for a routine.

Yes, *one* of the things the routine does is to split a comma-separated
list into individual items, but the *main* thing it does is process all
items in an slist of entries that are strings that are comma-separated
lists of items by passing them to a callback routine.

Rename the routine to describe what it does, namely process an enable or
disable list in the aforementioned format, calling a routine that
enables or disables the item.
This commit is contained in:
Guy Harris 2023-08-16 13:34:00 -07:00
parent 011aa3adfd
commit f25421db6c
1 changed files with 5 additions and 5 deletions

View File

@ -215,7 +215,7 @@ dissect_opts_handle_opt(int opt, char *optarg_str_p)
typedef gboolean (proto_set_func)(const char *);
static gboolean
slist_break_commas(GSList *list, proto_set_func callback)
process_enable_disable_list(GSList *list, proto_set_func callback)
{
gboolean success = TRUE;
gboolean rv;
@ -268,13 +268,13 @@ setup_enabled_and_disabled_protocols(void)
{
gboolean success = TRUE;
success &= slist_break_commas(global_dissect_options.disable_protocol_slist,
success &= process_enable_disable_list(global_dissect_options.disable_protocol_slist,
proto_disable_proto_by_name);
success &= slist_break_commas(global_dissect_options.enable_protocol_slist,
success &= process_enable_disable_list(global_dissect_options.enable_protocol_slist,
proto_enable_proto_by_name);
success &= slist_break_commas(global_dissect_options.enable_heur_slist,
success &= process_enable_disable_list(global_dissect_options.enable_heur_slist,
proto_enable_heuristic_by_name);
success &= slist_break_commas(global_dissect_options.disable_heur_slist,
success &= process_enable_disable_list(global_dissect_options.disable_heur_slist,
proto_disable_heuristic_by_name);
return success;
}