summaryrefslogtreecommitdiffabout
path: root/src/util.c
authorSergey Poznyakoff <gray@gnu.org>2018-08-31 08:26:31 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-08-31 08:26:31 (GMT)
commit2ff4ae9c745d4b9e6ee36468c81554027f66c35b (patch) (side-by-side diff)
tree4a6012ba90fc9c4fc9da8bade6fb943efc38d1a0 /src/util.c
parent778cc81d55aecd6344d577919cec73e4e6980e2e (diff)
downloadgdbm-2ff4ae9c745d4b9e6ee36468c81554027f66c35b.tar.gz
gdbm-2ff4ae9c745d4b9e6ee36468c81554027f66c35b.tar.bz2
Various bugfixes.
* compat/dbmopen.c (ndbm_open_dir_file0): Ignore ENOENT. * src/falloc.c (push_avail_block): Free temporary storage no matter what return status. * src/gdbm.h.in (GDBM_FILE_TRUNCATE_ERROR): New error code. * src/gdbmdump.c (_gdbm_dump_ascii): Initialize rc. * src/gdbmerrno.c: Handle new error.code * src/gdbmload.c (gdbm_load_bdb_dump): Initialize rc * src/gdbmopen.c (_gdbm_ftruncate): New function. (gdbm_fd_open): Use _gdbm_ftruncate. Check its return. * src/gdbmseq.c (gdbm_firstkey): Initialize dsize * src/gdbmtool.c (command_generator): Check if cmd is NULL. (shouldn't happen, but anyways). * src/mmap.c (_gdbm_mapped_lseek): Check for vailidity of the 'whence' parameter. * src/systems.h (TRUNCATE): Remove macro. * src/util.c (vgetyn): Remove unnecessary assignment.
Diffstat (limited to 'src/util.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index f254202..3493366 100644
--- a/src/util.c
+++ b/src/util.c
@@ -98,8 +98,9 @@ vgetyn (const char *prompt, va_list ap)
default:
fprintf (stdout, "%s\n", _("Please, reply 'y' or 'n'"));
}
- state = 0;
- } else
+ /* fall through */
+ }
+ else
break;
case 0:

Return to:

Send suggestions and report system problems to the System administrator.