From fb9a356e46c5adbc74e9d117463c0fb2b4778afe Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Thu, 17 Nov 2016 21:45:28 -0500 Subject: Add prefs_get_uint_value and prefs_get_range_value This allows dissectors to not need to know about the internal preference structure. Change-Id: I1ae67248cd0b0132aefc225ea0a9befaf9afdde2 Reviewed-on: https://code.wireshark.org/review/18864 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-rsync.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'epan/dissectors/packet-rsync.c') diff --git a/epan/dissectors/packet-rsync.c b/epan/dissectors/packet-rsync.c index 9ca13d66c6..c2c8d6acb9 100644 --- a/epan/dissectors/packet-rsync.c +++ b/epan/dissectors/packet-rsync.c @@ -30,7 +30,6 @@ #include #include #include -#include #include void proto_register_rsync(void); @@ -312,8 +311,7 @@ static void apply_rsync_prefs(void) { /* Rsync uses the port preference to determine client/server */ - pref_t *rsync_port = prefs_find_preference(prefs_find_module("rsync"), "tcp.port"); - glb_rsync_tcp_port = *rsync_port->varp.uint; + glb_rsync_tcp_port = prefs_get_uint_value("rsync", "tcp.port"); } /* Register protocol with Wireshark. */ -- cgit v1.2.3