summaryrefslogtreecommitdiffstats
path: root/src/H5Ostab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Ostab.c')
-rw-r--r--src/H5Ostab.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 4b061df..0fbda05 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -176,8 +176,7 @@ H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg)
void *
H5O_stab_fast(const H5G_cache_t *cache, const H5O_class_t *type, void *_mesg)
{
- H5O_stab_t *stab = NULL;
- void *ret_value; /* Return value */
+ H5O_stab_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5O_stab_fast);
@@ -187,16 +186,15 @@ H5O_stab_fast(const H5G_cache_t *cache, const H5O_class_t *type, void *_mesg)
if (H5O_STAB == type) {
if (_mesg) {
- stab = (H5O_stab_t *) _mesg;
- } else if (NULL==(stab = H5FL_CALLOC(H5O_stab_t))) {
+ ret_value = (H5O_stab_t *) _mesg;
+ } else if (NULL==(ret_value = H5FL_MALLOC(H5O_stab_t))) {
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
}
- stab->btree_addr = cache->stab.btree_addr;
- stab->heap_addr = cache->stab.heap_addr;
+ ret_value->btree_addr = cache->stab.btree_addr;
+ ret_value->heap_addr = cache->stab.heap_addr;
}
-
- /* Set return value */
- ret_value=stab;
+ else
+ ret_value=NULL;
done:
FUNC_LEAVE_NOAPI(ret_value);