~kaction/haskell-gdbm

04dd7518a461878482e305618edcda7e80e6ef23 — Dmitry Bogatov 4 years ago 8156cb2
Fix error with open flags

Writer, that creates, if needed is WRCREAT, writer that overwrites
is NEWDB.
1 files changed, 2 insertions(+), 2 deletions(-)

M cbits/link.c
M cbits/link.c => cbits/link.c +2 -2
@@ 10,13 10,13 @@ cbit_open_reader(/*const*/ char *name)
GDBM_FILE
cbit_open_writer(/*const*/ char *name)
{
	return gdbm_open(name, 0, GDBM_WRITER, 0, NULL);
	return gdbm_open(name, 0, GDBM_WRCREAT, 0644, NULL);
}

GDBM_FILE
cbit_open_recreate(/*const*/ char *name)
{
	return gdbm_open(name, 0, GDBM_WRCREAT, 0644, NULL);
	return gdbm_open(name, 0, GDBM_NEWDB, 0644, NULL);
}

void