summaryrefslogtreecommitdiffabout
path: root/src/findkey.c
Side-by-side diff
Diffstat (limited to 'src/findkey.c') (more/less context) (show 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
@@ -71,9 +71,7 @@ _gdbm_read_entry (GDBM_FILE dbf, int elem_loc)
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);
@@ -85,9 +83,8 @@ _gdbm_read_entry (GDBM_FILE dbf, int elem_loc)
}
/* 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);
@@ -95,8 +92,7 @@ _gdbm_read_entry (GDBM_FILE dbf, int elem_loc)
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,

Return to:

Send suggestions and report system problems to the System administrator.