diff options
Diffstat (limited to 'Src/Modules/db_gdbm.c')
-rw-r--r-- | Src/Modules/db_gdbm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/Modules/db_gdbm.c b/Src/Modules/db_gdbm.c index 35254b68c..c4bb931a3 100644 --- a/Src/Modules/db_gdbm.c +++ b/Src/Modules/db_gdbm.c @@ -157,10 +157,7 @@ bin_ztie(char *nam, char **args, Options ops, UNUSED(int func)) gdbm_errno=0; dbf = gdbm_open(resource_name, 0, read_write, 0666, 0); - if(dbf) { - addmodulefd(gdbm_fdesc(dbf), FDT_MODULE); - append_tied_name(pmname); - } else { + if(dbf == NULL) { zwarnnam(nam, "error opening database file %s (%s)", resource_name, gdbm_strerror(gdbm_errno)); return 1; } @@ -172,6 +169,9 @@ bin_ztie(char *nam, char **args, Options ops, UNUSED(int func)) return 1; } + addmodulefd(gdbm_fdesc(dbf), FDT_MODULE); + append_tied_name(pmname); + tied_param->gsu.h = &gdbm_hash_gsu; /* Allocate parameter sub-gsu, fill dbf field. |