diff options
| author | forsyth <forsyth@vitanuova.com> | 2011-12-15 16:40:16 +0000 |
|---|---|---|
| committer | forsyth <forsyth@vitanuova.com> | 2011-12-15 16:40:16 +0000 |
| commit | 28942ead413418b56c5be78e8c4c400881fba72e (patch) | |
| tree | cd646dce007974acc02e535a2c9ff800ada2b684 /liblogfs/map.c | |
| parent | 1eacf117f57c983da30e88f232fab9db7b1e300d (diff) | |
20111215-1640
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)) |
