aboutsummaryrefslogtreecommitdiff
path: root/src/gdbmopen.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-05-30 12:32:31 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-05-30 12:32:31 +0300
commita14a6881538229cd938282bd56c7f0d12a089be6 (patch)
tree89cfa47078460e7505c1a80ce71488eef29dfc63 /src/gdbmopen.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/gdbmopen.c')
-rw-r--r--src/gdbmopen.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gdbmopen.c b/src/gdbmopen.c
index 9c10d3d..22e7ca6 100644
--- a/src/gdbmopen.c
+++ b/src/gdbmopen.c
@@ -634,8 +634,7 @@ _gdbm_init_cache (GDBM_FILE dbf, size_t size)
634 634
635 if (dbf->bucket_cache == NULL) 635 if (dbf->bucket_cache == NULL)
636 { 636 {
637 dbf->bucket_cache = GDBM_DEBUG_ALLOC ("_gdbm_init_cache:malloc-failure", 637 dbf->bucket_cache = calloc (size, sizeof(cache_elem));
638 calloc (size, sizeof(cache_elem)));
639 if (dbf->bucket_cache == NULL) 638 if (dbf->bucket_cache == NULL)
640 { 639 {
641 GDBM_SET_ERRNO (dbf, GDBM_MALLOC_ERROR, TRUE); 640 GDBM_SET_ERRNO (dbf, GDBM_MALLOC_ERROR, TRUE);
@@ -645,9 +644,8 @@ _gdbm_init_cache (GDBM_FILE dbf, size_t size)
645 644
646 for (index = 0; index < size; index++) 645 for (index = 0; index < size; index++)
647 { 646 {
648 (dbf->bucket_cache[index]).ca_bucket = 647 (dbf->bucket_cache[index]).ca_bucket =
649 GDBM_DEBUG_ALLOC ("_gdbm_init_cache:bucket-malloc-failure", 648 malloc (dbf->header->bucket_size);
650 malloc (dbf->header->bucket_size));
651 if ((dbf->bucket_cache[index]).ca_bucket == NULL) 649 if ((dbf->bucket_cache[index]).ca_bucket == NULL)
652 { 650 {
653 GDBM_SET_ERRNO (dbf, GDBM_MALLOC_ERROR, TRUE); 651 GDBM_SET_ERRNO (dbf, GDBM_MALLOC_ERROR, TRUE);

Return to:

Send suggestions and report system problems to the System administrator.