int ${pd_prefix}mirroring_mapping_delete(p4_pd_mirror_id_t mirror_id) { mirroring_mapping_t *mapping = tommy_hashlin_remove(&mirroring_mappings, compare_mirroring_mappings, &mirror_id, tommy_inthash_u32(mirror_id)); free(mapping); return (mapping == NULL); /* 0 is success */ }
void *search_remove_elem_hash_table(void *ht, void *key, int key_len, void *compare) { return tommy_hashlin_remove(ht, compare, key, tommy_hash_u32(0, key, key_len)); }