--- ray/src/common/objset.c 2003/05/15 05:13:35 2.11 +++ ray/src/common/objset.c 2004/12/15 22:02:04 2.15 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: objset.c,v 2.11 2003/05/15 05:13:35 greg Exp $"; +static const char RCSid[] = "$Id: objset.c,v 2.15 2004/12/15 22:02:04 greg Exp $"; #endif /* * objset.c - routines for maintaining object sets. @@ -209,11 +209,12 @@ tryagain: ot = oseti(i*OSTSIZ + osentry); if (*os > 0) /* found it */ return(ot); - if (!isfull(ot)) /* entry overflow */ + if (!isfull(ot)) { /* entry overflow */ if (++ntries < OSTSIZ) goto tryagain; else error(INTERNAL, "hash table overflow in fullnode"); + } /* remember position */ i = os - ostable[osentry]; os = ostable[osentry] = (OBJECT *)realloc( @@ -229,6 +230,7 @@ tryagain: return(ot); memerr: error(SYSTEM, "out of memory in fullnode"); + return 0; /* pro forma return */ } @@ -253,26 +255,6 @@ OCTREE ot; return; noderr: error(CONSISTENCY, "bad node in objset"); -} - - -int -dosets(f) /* loop through all sets */ -int (*f)(); -{ - int res = 0; - int n; - register OBJECT *os; - - for (n = 0; n < OSTSIZ; n++) { - if ((os = ostable[n]) == NULL) - continue; - while (*os > 0) { - res += (*f)(os); - os += *os + 1; - } - } - return(res); }