SCCS-vsn: lib/libc/db/hash/hash.c 5.27
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash.c 5.26 (Berkeley) %G%";
+static char sccsid[] = "@(#)hash.c 5.27 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
DB *dbp;
int bpages, hdrsize, new_table, nsegs, save_errno;
DB *dbp;
int bpages, hdrsize, new_table, nsegs, save_errno;
- if (flags & O_WRONLY) {
+ if ((flags & O_ACCMODE) == O_WRONLY) {
errno = EINVAL;
return (NULL);
}
errno = EINVAL;
return (NULL);
}