aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pdcp-lte.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2014-12-12 16:53:05 +0000
committerEvan Huus <eapache@gmail.com>2014-12-13 00:17:23 +0000
commit5d6eb80c14d786fe781c50c4899b7cdf03131db8 (patch)
treeaef6b60e6cfa913072afb418719ad77d09325962 /epan/dissectors/packet-pdcp-lte.c
parentb0cdee67da31683d691de6556a592624e86a351e (diff)
Use g_direct_ functions for hash tables where possible
Change-Id: Ie364cbdcf500d7a04e64d7adcdd03bd1926dda86 Reviewed-on: https://code.wireshark.org/review/5736 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-pdcp-lte.c')
-rw-r--r--epan/dissectors/packet-pdcp-lte.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c
index 294c18c4e0..3e81ae187e 100644
--- a/epan/dissectors/packet-pdcp-lte.c
+++ b/epan/dissectors/packet-pdcp-lte.c
@@ -480,20 +480,6 @@ typedef struct
Maps key -> status */
static GHashTable *pdcp_sequence_analysis_channel_hash = NULL;
-/* Equal keys */
-static gint pdcp_channel_equal(gconstpointer v, gconstpointer v2)
-{
- /* Key fits in 4 bytes, so just compare pointers! */
- return (v == v2);
-}
-
-/* Compute a hash value for a given key. */
-static guint pdcp_channel_hash_func(gconstpointer v)
-{
- /* Just use pointer, as the fields are all in this value */
- return GPOINTER_TO_UINT(v);
-}
-
/* Hash table types & functions for frame reports */
@@ -2263,7 +2249,7 @@ static void pdcp_lte_init_protocol(void)
/* Now create them over */
- pdcp_sequence_analysis_channel_hash = g_hash_table_new(pdcp_channel_hash_func, pdcp_channel_equal);
+ pdcp_sequence_analysis_channel_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
pdcp_lte_sequence_analysis_report_hash = g_hash_table_new(pdcp_result_hash_func, pdcp_result_hash_equal);
pdcp_security_hash = g_hash_table_new(pdcp_lte_ueid_hash_func, pdcp_lte_ueid_hash_equal);
pdcp_security_result_hash = g_hash_table_new(pdcp_lte_ueid_frame_hash_func, pdcp_lte_ueid_frame_hash_equal);