summaryrefslogtreecommitdiffabout
path: root/src/gdbmstore.c
Unidiff
Diffstat (limited to 'src/gdbmstore.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/gdbmstore.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gdbmstore.c b/src/gdbmstore.c
index 2ed1616..6b498b2 100644
--- a/src/gdbmstore.c
+++ b/src/gdbmstore.c
@@ -160,8 +160,7 @@ gdbm_store (GDBM_FILE dbf, datum key, datum content, int flags)
160 dbf->bucket->h_table[elem_loc].data_size = content.dsize; 160 dbf->bucket->h_table[elem_loc].data_size = content.dsize;
161 161
162 /* Write the data to the file. */ 162 /* Write the data to the file. */
163 file_pos = GDBM_DEBUG_OVERRIDE ("gdbm_store:seek-failure", 163 file_pos = __lseek (dbf, file_adr, SEEK_SET);
164 __lseek (dbf, file_adr, SEEK_SET));
165 if (file_pos != file_adr) 164 if (file_pos != file_adr)
166 { 165 {
167 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR, 166 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR,
@@ -171,8 +170,7 @@ gdbm_store (GDBM_FILE dbf, datum key, datum content, int flags)
171 return -1; 170 return -1;
172 } 171 }
173 172
174 rc = GDBM_DEBUG_OVERRIDE ("gdbm_store:write-1-failure", 173 rc = _gdbm_full_write (dbf, key.dptr, key.dsize);
175 _gdbm_full_write (dbf, key.dptr, key.dsize));
176 if (rc) 174 if (rc)
177 { 175 {
178 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR, 176 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR,
@@ -182,9 +180,7 @@ gdbm_store (GDBM_FILE dbf, datum key, datum content, int flags)
182 return -1; 180 return -1;
183 } 181 }
184 182
185 rc = GDBM_DEBUG_OVERRIDE ("gdbm_store:write-2-failure", 183 rc = _gdbm_full_write (dbf, content.dptr, content.dsize);
186 _gdbm_full_write (dbf,
187 content.dptr, content.dsize));
188 if (rc) 184 if (rc)
189 { 185 {
190 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR, 186 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR,

Return to:

Send suggestions and report system problems to the System administrator.