diff options
author | 2005-10-10 19:23:41 +0000 | |
---|---|---|
committer | 2005-10-10 19:23:41 +0000 | |
commit | 03453616b0735912fbdfd5243b3f66a68a4cd997 (patch) | |
tree | 02be91e3683436ae661873d7d5ca0bf152677370 /lib/libc/db | |
parent | - add VIA K8T890 Host and PCI-PCI bridges. Noticed in PR 4539. (diff) | |
download | wireguard-openbsd-03453616b0735912fbdfd5243b3f66a68a4cd997.tar.xz wireguard-openbsd-03453616b0735912fbdfd5243b3f66a68a4cd997.zip |
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@
Diffstat (limited to 'lib/libc/db')
-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); } |