summaryrefslogtreecommitdiffabout
path: root/src/findkey.c
Side-by-side diff
Diffstat (limited to 'src/findkey.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/findkey.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/findkey.c b/src/findkey.c
index bd9fd83..9bb4553 100644
--- a/src/findkey.c
+++ b/src/findkey.c
@@ -68,38 +68,34 @@ _gdbm_read_entry (GDBM_FILE dbf, int elem_loc)
if (data_ca->dptr != NULL) free (data_ca->dptr);
data_ca->key_size = key_size;
data_ca->data_size = data_size;
data_ca->elem_loc = elem_loc;
data_ca->hash_val = dbf->bucket->h_table[elem_loc].hash_value;
- if (GDBM_DEBUG_HOOK ("_gdbm_read_entry:malloc-failure"))
- data_ca->dptr = NULL;
- else if (key_size + data_size == 0)
+ if (key_size + data_size == 0)
data_ca->dptr = (char *) malloc (1);
else
data_ca->dptr = (char *) malloc (key_size + data_size);
if (data_ca->dptr == NULL)
{
GDBM_SET_ERRNO2 (dbf, GDBM_MALLOC_ERROR, FALSE, GDBM_DEBUG_LOOKUP);
_gdbm_fatal (dbf, _("malloc error"));
return NULL;
}
/* Read into the cache. */
- file_pos = GDBM_DEBUG_OVERRIDE ("_gdbm_read_entry:lseek-failure",
- __lseek (dbf, dbf->bucket->h_table[elem_loc].data_pointer,
- SEEK_SET));
+ file_pos = __lseek (dbf, dbf->bucket->h_table[elem_loc].data_pointer,
+ SEEK_SET);
if (file_pos != dbf->bucket->h_table[elem_loc].data_pointer)
{
GDBM_SET_ERRNO2 (dbf, GDBM_FILE_SEEK_ERROR, TRUE, GDBM_DEBUG_LOOKUP);
_gdbm_fatal (dbf, _("lseek error"));
return NULL;
}
- rc = GDBM_DEBUG_OVERRIDE ("_gdbm_read_entry:read-failure",
- _gdbm_full_read (dbf, data_ca->dptr, key_size+data_size));
+ rc = _gdbm_full_read (dbf, data_ca->dptr, key_size+data_size);
if (rc)
{
GDBM_DEBUG (GDBM_DEBUG_ERR|GDBM_DEBUG_LOOKUP|GDBM_DEBUG_READ,
"%s: error reading entry: %s",
dbf->name, gdbm_db_strerror (dbf));
dbf->need_recovery = TRUE;

Return to:

Send suggestions and report system problems to the System administrator.