aboutsummaryrefslogtreecommitdiff
path: root/src/gdbmdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdbmdump.c')
-rw-r--r--src/gdbmdump.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gdbmdump.c b/src/gdbmdump.c
index daf6a43..2e6f5b0 100644
--- a/src/gdbmdump.c
+++ b/src/gdbmdump.c
@@ -114,9 +114,16 @@ _gdbm_dump_ascii (GDBM_FILE dbf, FILE *fp)
- if (rc == 0 && (rc = gdbm_last_errno (dbf)) == 0)
+ /* FIXME: Something like that won't hurt, although load does not
+ use it currently. */
+ fprintf (fp, "#:count=%lu\n", (unsigned long) count);
+ fprintf (fp, "# End of data\n");
+
+ if (rc == 0)
{
-
- /* FIXME: Something like that won't hurt, although load does not
- use it currently. */
- fprintf (fp, "#:count=%lu\n", (unsigned long) count);
- fprintf (fp, "# End of data\n");
+ rc = gdbm_last_errno (dbf);
+ if (rc == GDBM_ITEM_NOT_FOUND)
+ {
+ gdbm_clear_error (dbf);
+ gdbm_errno = GDBM_NO_ERROR;
+ rc = 0;
+ }
}
@@ -124,3 +131,2 @@ _gdbm_dump_ascii (GDBM_FILE dbf, FILE *fp)
-
return rc ? -1 : 0;

Return to:

Send suggestions and report system problems to the System administrator.