summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-rsl.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-01-13 02:16:04 +0100
committerAnders Broman <a.broman58@gmail.com>2016-01-13 11:36:29 +0000
commitbf0f5a982bc0666b6fa8d70c8d64cb1f07ab12ad (patch)
tree1a6adb34aa0b0b7b59e5f1f2fedfda9014e9769d /epan/dissectors/packet-rsl.c
parent4f4769adf626ec2601e3488efbc2e2d57d55762c (diff)
downloadwireshark-bf0f5a982bc0666b6fa8d70c8d64cb1f07ab12ad.tar.gz
Use result of register_dissector
Assign result of `register_dissector(..., func, proto)` to FOO_handle and remove `FOO_handle = create_dissector_handle(func, proto)`. Found by looking for files named packet-FOO.c having the above create_dissector_handle pattern. Some files (with different dissect routines for the two functions) remain unchanged. Change-Id: Ifbed8202c6dbc63a1dae9acc03313980ffbbbb90 Reviewed-on: https://code.wireshark.org/review/13247 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rsl.c')
-rw-r--r--epan/dissectors/packet-rsl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c
index 17a9df1de0..000d7bf375 100644
--- a/epan/dissectors/packet-rsl.c
+++ b/epan/dissectors/packet-rsl.c
@@ -219,6 +219,7 @@ static expert_field ei_rsl_facility_information_element_3gpp_ts_44071 = EI_INIT;
static expert_field ei_rsl_embedded_message_tfo_configuration = EI_INIT;
static proto_tree *top_tree;
+static dissector_handle_t rsl_handle;
static dissector_handle_t gsm_cbch_handle;
static dissector_handle_t gsm_cbs_handle;
static dissector_handle_t gsm_a_ccch_handle;
@@ -4450,7 +4451,7 @@ void proto_register_rsl(void)
expert_rsl = expert_register_protocol(proto_rsl);
expert_register_field_array(expert_rsl, ei, array_length(ei));
- register_dissector("gsm_abis_rsl", dissect_rsl, proto_rsl);
+ rsl_handle = register_dissector("gsm_abis_rsl", dissect_rsl, proto_rsl);
rsl_module = prefs_register_protocol(proto_rsl, proto_reg_handoff_rsl);
prefs_register_bool_preference(rsl_module, "use_ipaccess_rsl",
@@ -4462,9 +4463,6 @@ void proto_register_rsl(void)
void
proto_reg_handoff_rsl(void)
{
- dissector_handle_t rsl_handle;
-
- rsl_handle = create_dissector_handle(dissect_rsl, proto_rsl);
dissector_add_uint("lapd.gsm.sapi", LAPD_GSM_SAPI_RA_SIG_PROC, rsl_handle);
gsm_cbch_handle = find_dissector("gsm_cbch");