diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-12-31 02:08:01 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-12-31 02:08:01 +0000 |
commit | caf46302c86603d4425e05b582653e827afde9ca (patch) | |
tree | e4a12e1bded25940624af6226616ef7df7f60812 /epan | |
parent | f2972f0925345539836bc4081a3257fc534fe68b (diff) |
Don't assign the const pointers passed to hash routines to non-const
pointers.
svn path=/trunk/; revision=12890
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-aoe.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-fc.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-fcels.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-fcfzs.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-fcp.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-sip.c | 6 |
6 files changed, 18 insertions, 18 deletions
diff --git a/epan/dissectors/packet-aoe.c b/epan/dissectors/packet-aoe.c index 0a6196a9da..4efeaac4bb 100644 --- a/epan/dissectors/packet-aoe.c +++ b/epan/dissectors/packet-aoe.c @@ -202,7 +202,7 @@ ata_cmd_equal_matched(gconstpointer k1, gconstpointer k2) static guint ata_cmd_hash_unmatched(gconstpointer k) { - const ata_info_t *key = (ata_info_t *)k; + const ata_info_t *key = k; return key->tag; } @@ -210,8 +210,8 @@ ata_cmd_hash_unmatched(gconstpointer k) static gint ata_cmd_equal_unmatched(gconstpointer k1, gconstpointer k2) { - const ata_info_t *key1 = (ata_info_t *)k1; - const ata_info_t *key2 = (ata_info_t *)k2; + const ata_info_t *key1 = k1; + const ata_info_t *key2 = k2; return (key1->tag==key2->tag)&&(key1->conversation==key2->conversation); } diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c index fe25f3cc29..00d51d8b0e 100644 --- a/epan/dissectors/packet-fc.c +++ b/epan/dissectors/packet-fc.c @@ -166,8 +166,8 @@ static guint32 fc_exchange_init_count = 200; static gint fcseq_equal(gconstpointer v, gconstpointer w) { - fcseq_conv_key_t *v1 = (fcseq_conv_key_t *)v; - fcseq_conv_key_t *v2 = (fcseq_conv_key_t *)w; + const fcseq_conv_key_t *v1 = v; + const fcseq_conv_key_t *v2 = w; return (v1->conv_idx == v2->conv_idx); } @@ -175,7 +175,7 @@ fcseq_equal(gconstpointer v, gconstpointer w) static guint fcseq_hash (gconstpointer v) { - fcseq_conv_key_t *key = (fcseq_conv_key_t *)v; + const fcseq_conv_key_t *key = v; guint val; val = key->conv_idx; diff --git a/epan/dissectors/packet-fcels.c b/epan/dissectors/packet-fcels.c index a31387038f..d3c54c2960 100644 --- a/epan/dissectors/packet-fcels.c +++ b/epan/dissectors/packet-fcels.c @@ -193,8 +193,8 @@ static dissector_handle_t data_handle, fcsp_handle; static gint fcels_equal(gconstpointer v, gconstpointer w) { - fcels_conv_key_t *v1 = (fcels_conv_key_t *)v; - fcels_conv_key_t *v2 = (fcels_conv_key_t *)w; + const fcels_conv_key_t *v1 = v; + const fcels_conv_key_t *v2 = w; return (v1->conv_idx == v2->conv_idx); } @@ -202,7 +202,7 @@ fcels_equal(gconstpointer v, gconstpointer w) static guint fcels_hash (gconstpointer v) { - fcels_conv_key_t *key = (fcels_conv_key_t *)v; + const fcels_conv_key_t *key = v; guint val; val = key->conv_idx; diff --git a/epan/dissectors/packet-fcfzs.c b/epan/dissectors/packet-fcfzs.c index 6a3154d81f..00807a8d75 100644 --- a/epan/dissectors/packet-fcfzs.c +++ b/epan/dissectors/packet-fcfzs.c @@ -108,8 +108,8 @@ static dissector_handle_t data_handle; static gint fcfzs_equal(gconstpointer v, gconstpointer w) { - fcfzs_conv_key_t *v1 = (fcfzs_conv_key_t *)v; - fcfzs_conv_key_t *v2 = (fcfzs_conv_key_t *)w; + const fcfzs_conv_key_t *v1 = v; + const fcfzs_conv_key_t *v2 = w; return (v1->conv_idx == v2->conv_idx); } @@ -117,7 +117,7 @@ fcfzs_equal(gconstpointer v, gconstpointer w) static guint fcfzs_hash (gconstpointer v) { - fcfzs_conv_key_t *key = (fcfzs_conv_key_t *)v; + const fcfzs_conv_key_t *key = v; guint val; val = key->conv_idx; diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c index c87307587f..fb9282b771 100644 --- a/epan/dissectors/packet-fcp.c +++ b/epan/dissectors/packet-fcp.c @@ -108,8 +108,8 @@ guint32 fcp_init_count = 25; static gint fcp_equal(gconstpointer v, gconstpointer w) { - fcp_conv_key_t *v1 = (fcp_conv_key_t *)v; - fcp_conv_key_t *v2 = (fcp_conv_key_t *)w; + const fcp_conv_key_t *v1 = v; + const fcp_conv_key_t *v2 = w; return (v1->conv_idx == v2->conv_idx); } @@ -117,7 +117,7 @@ fcp_equal(gconstpointer v, gconstpointer w) static guint fcp_hash (gconstpointer v) { - fcp_conv_key_t *key = (fcp_conv_key_t *)v; + const fcp_conv_key_t *key = v; guint val; val = key->conv_idx; diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index 8582db1a1c..6c82ea74b1 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -481,8 +481,8 @@ typedef struct /* Equal keys */ gint sip_equal(gconstpointer v, gconstpointer v2) { - const sip_hash_key* val1 = (sip_hash_key*)v; - const sip_hash_key* val2 = (sip_hash_key*)v2; + const sip_hash_key* val1 = v; + const sip_hash_key* val2 = v2; /* Call id must match */ if (strcmp(val1->call_id, val2->call_id) != 0) @@ -502,7 +502,7 @@ gint sip_equal(gconstpointer v, gconstpointer v2) guint sip_hash_func(gconstpointer v) { gint n; - sip_hash_key *key = (sip_hash_key*)v; + const sip_hash_key *key = v; guint value = strlen(key->call_id); gint chars_to_use = value / 4; |