Changes in uspace/srv/devman/devtree.c [3083c74:5e801dc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devtree.c
r3083c74 r5e801dc 42 42 /* hash table operations */ 43 43 44 static inline size_t handle_key_hash( void *key)45 { 46 devman_handle_t handle = *(devman_handle_t *)key;47 return handle;44 static inline size_t handle_key_hash(const void *key) 45 { 46 const devman_handle_t *handle = key; 47 return *handle; 48 48 } 49 49 … … 60 60 } 61 61 62 static bool devman_devices_key_equal( void *key, const ht_link_t *item)63 { 64 devman_handle_t handle = *(devman_handle_t *)key;62 static bool devman_devices_key_equal(const void *key, const ht_link_t *item) 63 { 64 const devman_handle_t *handle = key; 65 65 dev_node_t *dev = hash_table_get_inst(item, dev_node_t, devman_dev); 66 return dev->handle == handle;67 } 68 69 static bool devman_functions_key_equal( void *key, const ht_link_t *item)70 { 71 devman_handle_t handle = *(devman_handle_t *)key;66 return dev->handle == *handle; 67 } 68 69 static bool devman_functions_key_equal(const void *key, const ht_link_t *item) 70 { 71 const devman_handle_t *handle = key; 72 72 fun_node_t *fun = hash_table_get_inst(item, fun_node_t, devman_fun); 73 return fun->handle == handle;74 } 75 76 static inline size_t service_id_key_hash( void *key)77 { 78 service_id_t service_id = *(service_id_t *)key;79 return service_id;73 return fun->handle == *handle; 74 } 75 76 static inline size_t service_id_key_hash(const void *key) 77 { 78 const service_id_t *service_id = key; 79 return *service_id; 80 80 } 81 81 … … 86 86 } 87 87 88 static bool loc_functions_key_equal( void *key, const ht_link_t *item)89 { 90 service_id_t service_id = *(service_id_t *)key;88 static bool loc_functions_key_equal(const void *key, const ht_link_t *item) 89 { 90 const service_id_t *service_id = key; 91 91 fun_node_t *fun = hash_table_get_inst(item, fun_node_t, loc_fun); 92 return fun->service_id == service_id;92 return fun->service_id == *service_id; 93 93 } 94 94
Note:
See TracChangeset
for help on using the changeset viewer.