From f25421db6c516ebf1bb1101835a328c6066b79fb Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 16 Aug 2023 13:34:00 -0700 Subject: [PATCH] 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. --- ui/dissect_opts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/dissect_opts.c b/ui/dissect_opts.c index 7ed0e589cd..27c21dfaa6 100644 --- a/ui/dissect_opts.c +++ b/ui/dissect_opts.c @@ -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; }