aboutsummaryrefslogtreecommitdiff
path: root/src/gdbmopen.c
diff options
context:
space:
mode:
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
@@ -625,38 +625,36 @@ gdbm_open (const char *file, int block_size, int flags, int mode,
return gdbm_fd_open (fd, file, block_size, flags | GDBM_CLOERROR,
fatal_func);
}
/* Initialize the bucket cache. */
int
_gdbm_init_cache (GDBM_FILE dbf, size_t size)
{
int index;
if (dbf->bucket_cache == NULL)
{
- dbf->bucket_cache = GDBM_DEBUG_ALLOC ("_gdbm_init_cache:malloc-failure",
- calloc (size, sizeof(cache_elem)));
+ dbf->bucket_cache = calloc (size, sizeof(cache_elem));
if (dbf->bucket_cache == NULL)
{
GDBM_SET_ERRNO (dbf, GDBM_MALLOC_ERROR, TRUE);
return -1;
}
dbf->cache_size = size;
for (index = 0; index < size; index++)
{
- (dbf->bucket_cache[index]).ca_bucket =
- GDBM_DEBUG_ALLOC ("_gdbm_init_cache:bucket-malloc-failure",
- malloc (dbf->header->bucket_size));
+ (dbf->bucket_cache[index]).ca_bucket =
+ malloc (dbf->header->bucket_size);
if ((dbf->bucket_cache[index]).ca_bucket == NULL)
{
GDBM_SET_ERRNO (dbf, GDBM_MALLOC_ERROR, TRUE);
return -1;
}
dbf->bucket_cache[index].ca_data.dptr = NULL;
_gdbm_cache_entry_invalidate (dbf, index);
}
dbf->bucket = dbf->bucket_cache[0].ca_bucket;
dbf->cache_entry = &dbf->bucket_cache[0];
}
return 0;

Return to:

Send suggestions and report system problems to the System administrator.