diff options
author | Miles Bader <miles@gnu.org> | 1996-10-12 03:38:21 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-10-12 03:38:21 +0000 |
commit | 201d97bbe938892fce5666ab251d5b9387145f52 (patch) | |
tree | 2a68fcc61fb0ffc6284dd36159052d54735da77c /db | |
parent | 1f64ac13c02e70285e26a0572d9393a3ee0f9ad8 (diff) | |
download | glibc-201d97bbe938892fce5666ab251d5b9387145f52.tar.gz |
(__hash_open): Correctly test for a read-write db.cvs/libc-961012
Diffstat (limited to 'db')
-rw-r--r-- | db/hash/hash.c | 2 |
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; |