From 201d97bbe938892fce5666ab251d5b9387145f52 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 12 Oct 1996 03:38:21 +0000 Subject: (__hash_open): Correctly test for a read-write db. --- db/hash/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/hash/hash.c b/db/hash/hash.c index 0db7b32b8c..1f26c7e68a 100644 --- a/db/hash/hash.c +++ b/db/hash/hash.c @@ -189,7 +189,7 @@ __hash_open(file, flags, mode, info, dflags) __buf_init(hashp, DEF_BUFSIZE); hashp->new_file = new_table; - hashp->save_file = file && (hashp->flags & O_RDWR); + hashp->save_file = file && (hashp->flags & O_ACCMODE) != O_RDONLY; hashp->cbucket = -1; if (!(dbp = (DB *)malloc(sizeof(DB)))) { save_errno = errno; -- cgit v1.2.3