diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-10-10 19:23:42 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-10-10 19:23:42 +0000 |
commit | f737de00e2b52aff623fe522eb98792152d60c34 (patch) | |
tree | 61b1ad0324ca9844c71b854726b7cd54d3ef8823 | |
parent | 0b9f8e313f118c78e5a8cd254565a4e2179314d3 (diff) |
Pass local var instead of mp->lqh.cqh_first to CIRCLEQ_REMOVE macro.
The latter might fail, depending on the actual implementation of
CIRCLEQ_REMOVE. Found by a strict queue.h I'm working on.
ok pedro@ millert@
-rw-r--r-- | lib/libc/db/mpool/mpool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c index 9792a1c5ce3..83791ee37a2 100644 --- a/lib/libc/db/mpool/mpool.c +++ b/lib/libc/db/mpool/mpool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpool.c,v 1.14 2005/08/05 13:03:00 espie Exp $ */ +/* $OpenBSD: mpool.c,v 1.15 2005/10/10 19:23:41 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -289,8 +289,8 @@ mpool_close(MPOOL *mp) BKT *bp; /* Free up any space allocated to the lru pages. */ - while ((bp = mp->lqh.cqh_first) != (void *)&mp->lqh) { - CIRCLEQ_REMOVE(&mp->lqh, mp->lqh.cqh_first, q); + while ((bp = CIRCLEQ_FIRST(&mp->lqh)) != CIRCLEQ_END(&mp->lqh)) { + CIRCLEQ_REMOVE(&mp->lqh, bp, q); free(bp); } |