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;
}
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);
}
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);
}
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;
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);
}
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;
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);
}
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;
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);
}
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;
/* 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)
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;