mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
(__hash_open): Correctly test for a read-write db.
This commit is contained in:
parent
1f64ac13c0
commit
201d97bbe9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user