Store devices as a hashtable
This commit is contained in:
@ -29,7 +29,7 @@ enum {
|
||||
#define HSHTB_ALLOC(tb, keyfield, k, out) \
|
||||
do { \
|
||||
size_t __len = sizeof((tb)) / sizeof((tb)[0]); \
|
||||
uint32_t __h = hshtb_fnv32((k), strlen((k))); \
|
||||
uint32_t __h = hshtb_fnv32((k), hal_strlen((k))); \
|
||||
size_t __idx = __h % __len; \
|
||||
size_t __start = __idx; \
|
||||
typeof(&(tb)[0]) __tomb = NULL; \
|
||||
|
Reference in New Issue
Block a user