diff options
Diffstat (limited to 'liblogfs/map.c')
| -rw-r--r-- | liblogfs/map.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/liblogfs/map.c b/liblogfs/map.c index 7642475e..b2def4fa 100644 --- a/liblogfs/map.c +++ b/liblogfs/map.c @@ -1,11 +1,13 @@ -#include "lib9.h" +#include "logfsos.h" #include "logfs.h" #include "local.h" -typedef struct MapNode { - struct MapNode *next; +typedef struct MapNode MapNode; + +struct MapNode { + MapNode *next; uchar e[1]; // entry goes here, inline -} MapNode; +}; struct Map { int size; @@ -61,6 +63,7 @@ find(FidMap *m, void *key, int create, void **ep) { MapNode *n; int i; + i = (*m->hash)(key, m->size); n = m->head[i]; while(n && !(*m->compare)(n->e, key)) |
