From 28942ead413418b56c5be78e8c4c400881fba72e Mon Sep 17 00:00:00 2001 From: forsyth Date: Thu, 15 Dec 2011 16:40:16 +0000 Subject: 20111215-1640 --- liblogfs/map.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'liblogfs/map.c') 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)) -- cgit v1.2.3