summaryrefslogtreecommitdiffstats
path: root/lib/libc/db
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-08-24 23:44:07 +0000
committerdelphij <delphij@FreeBSD.org>2009-08-24 23:44:07 +0000
commit10dee87cc0ea35762ecf46cbf2a49039a1104edc (patch)
tree31d40f3c2a9dfecf66a2897ff03e4e7e12733275 /lib/libc/db
parent61c6f92db746bbaecfcb483bc8fa324850441377 (diff)
downloadFreeBSD-src-10dee87cc0ea35762ecf46cbf2a49039a1104edc.zip
FreeBSD-src-10dee87cc0ea35762ecf46cbf2a49039a1104edc.tar.gz
Consider flag == 0 as the same of flag == R_NEXT. This change will restore
a historical behavior that has been changed by revision 190491, and has seen to break exim.
Diffstat (limited to 'lib/libc/db')
-rw-r--r--lib/libc/db/hash/hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
index b58b36f..83d2657 100644
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -711,7 +711,7 @@ hash_seq(const DB *dbp, DBT *key, DBT *data, u_int32_t flag)
hashp->cndx = 1;
hashp->cpage = NULL;
}
- next_bucket:
+next_bucket:
for (bp = NULL; !bp || !bp[0]; ) {
if (!(bufp = hashp->cpage)) {
for (bucket = hashp->cbucket;
@@ -732,7 +732,7 @@ hash_seq(const DB *dbp, DBT *key, DBT *data, u_int32_t flag)
}
} else {
bp = (u_int16_t *)hashp->cpage->page;
- if (flag == R_NEXT) {
+ if (flag == R_NEXT || flag == 0) {
hashp->cndx += 2;
if (hashp->cndx > bp[0]) {
hashp->cpage = NULL;
OpenPOWER on IntegriCloud