summaryrefslogtreecommitdiffabout
path: root/src/gdbmdump.c
Unidiff
Diffstat (limited to 'src/gdbmdump.c') (more/less context) (show whitespace changes)
-rw-r--r--src/gdbmdump.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gdbmdump.c b/src/gdbmdump.c
index daf6a43..2e6f5b0 100644
--- a/src/gdbmdump.c
+++ b/src/gdbmdump.c
@@ -112,17 +112,23 @@ _gdbm_dump_ascii (GDBM_FILE dbf, FILE *fp)
112 count++; 112 count++;
113 } 113 }
114 114
115 if (rc == 0 && (rc = gdbm_last_errno (dbf)) == 0)
116 {
117
118 /* FIXME: Something like that won't hurt, although load does not 115 /* FIXME: Something like that won't hurt, although load does not
119 use it currently. */ 116 use it currently. */
120 fprintf (fp, "#:count=%lu\n", (unsigned long) count); 117 fprintf (fp, "#:count=%lu\n", (unsigned long) count);
121 fprintf (fp, "# End of data\n"); 118 fprintf (fp, "# End of data\n");
119
120 if (rc == 0)
121 {
122 rc = gdbm_last_errno (dbf);
123 if (rc == GDBM_ITEM_NOT_FOUND)
124 {
125 gdbm_clear_error (dbf);
126 gdbm_errno = GDBM_NO_ERROR;
127 rc = 0;
128 }
122 } 129 }
123 free (buffer); 130 free (buffer);
124 131
125
126 return rc ? -1 : 0; 132 return rc ? -1 : 0;
127} 133}
128 134

Return to:

Send suggestions and report system problems to the System administrator.