summaryrefslogtreecommitdiffabout
path: root/src/findkey.c
authorSergey Poznyakoff <gray@gnu.org>2018-05-30 09:32:31 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-05-30 09:32:31 (GMT)
commita14a6881538229cd938282bd56c7f0d12a089be6 (patch) (side-by-side diff)
tree89cfa47078460e7505c1a80ce71488eef29dfc63 /src/findkey.c
parent07caec236e3af48973874f2c0e19bafec4d13f78 (diff)
downloadgdbm-a14a6881538229cd938282bd56c7f0d12a089be6.tar.gz
gdbm-a14a6881538229cd938282bd56c7f0d12a089be6.tar.bz2
Drop debugging hooks
The hooks were introduced as a temporary tool in de7834e9. They did their job and are not necessary any more.
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
@@ -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.