aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-10-12 03:38:21 +0000
committerMiles Bader <miles@gnu.org>1996-10-12 03:38:21 +0000
commit201d97bbe938892fce5666ab251d5b9387145f52 (patch)
tree2a68fcc61fb0ffc6284dd36159052d54735da77c /db
parent1f64ac13c02e70285e26a0572d9393a3ee0f9ad8 (diff)
downloadglibc-201d97bbe938892fce5666ab251d5b9387145f52.tar
glibc-201d97bbe938892fce5666ab251d5b9387145f52.tar.gz
glibc-201d97bbe938892fce5666ab251d5b9387145f52.tar.bz2
glibc-201d97bbe938892fce5666ab251d5b9387145f52.zip
(__hash_open): Correctly test for a read-write db.cvs/libc-961012
Diffstat (limited to 'db')
-rw-r--r--db/hash/hash.c2
1 files changed, 1 insertions, 1 deletions
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;