summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-19 20:43:24 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-19 20:43:24 (GMT)
commit69adfc23bd542bece0a1bcfb2f987309f93d52b8 (patch)
treeffb9f0ed33ead1cc0b740969141d4a19f7471be4 /src
parentcccd3d26d61348db189ec262548fab26f062a427 (diff)
downloadhdf5-69adfc23bd542bece0a1bcfb2f987309f93d52b8.zip
hdf5-69adfc23bd542bece0a1bcfb2f987309f93d52b8.tar.gz
hdf5-69adfc23bd542bece0a1bcfb2f987309f93d52b8.tar.bz2
[svn-r18042] Description:
Bring r18039 from trunk to 1.8 branch: Minor code cleanups, to align better w/ongoing metadata journaling convergence. Tested on: Mac OS X/32 10.6.2 (amazon) w/debug (too minor to require h5committest)
Diffstat (limited to 'src')
-rw-r--r--src/H5HG.c19
-rw-r--r--src/H5HGcache.c22
-rw-r--r--src/H5HL.c22
-rw-r--r--src/H5HLcache.c23
4 files changed, 43 insertions, 43 deletions
diff --git a/src/H5HG.c b/src/H5HG.c
index 5578014..6f78469 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -99,6 +99,15 @@ static haddr_t H5HG_create(H5F_t *f, hid_t dxpl_id, size_t size);
/* Package Variables */
/*********************/
+/* Declare a free list to manage the H5HG_t struct */
+H5FL_DEFINE(H5HG_heap_t);
+
+/* Declare a free list to manage sequences of H5HG_obj_t's */
+H5FL_SEQ_DEFINE(H5HG_obj_t);
+
+/* Declare a PQ free list to manage heap chunks */
+H5FL_BLK_DEFINE(gheap_chunk);
+
/*****************************/
/* Library Private Variables */
@@ -109,15 +118,6 @@ static haddr_t H5HG_create(H5F_t *f, hid_t dxpl_id, size_t size);
/* Local Variables */
/*******************/
-/* Declare a free list to manage the H5HG_t struct */
-H5FL_DEFINE(H5HG_heap_t);
-
-/* Declare a free list to manage sequences of H5HG_obj_t's */
-H5FL_SEQ_DEFINE(H5HG_obj_t);
-
-/* Declare a PQ free list to manage heap chunks */
-H5FL_BLK_DEFINE(gheap_chunk);
-
/*-------------------------------------------------------------------------
@@ -830,7 +830,6 @@ H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj)
* The collection is empty. Remove it from the CWFS list and return it
* to the file free list.
*/
- H5_CHECK_OVERFLOW(heap->size, size_t, hsize_t);
flags |= H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG; /* Indicate that the object was deleted, for the unprotect call */
} /* end if */
else {
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index 19f2526..e6347b5 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -75,16 +75,6 @@ static herr_t H5HG_size(const H5F_t *f, const H5HG_heap_t *heap, size_t *size_pt
/* Package Variables */
/*********************/
-
-/*****************************/
-/* Library Private Variables */
-/*****************************/
-
-
-/*******************/
-/* Local Variables */
-/*******************/
-
/* H5HG inherits cache-like properties from H5AC */
const H5AC_class_t H5AC_GHEAP[1] = {{
H5AC_GHEAP_ID,
@@ -96,6 +86,16 @@ const H5AC_class_t H5AC_GHEAP[1] = {{
}};
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
/*-------------------------------------------------------------------------
* Function: H5HG_load
@@ -380,7 +380,7 @@ H5HG_dest(H5F_t *f, H5HG_heap_t *heap)
heap->chunk = H5FL_BLK_FREE(gheap_chunk, heap->chunk);
if(heap->obj)
heap->obj = H5FL_SEQ_FREE(H5HG_obj_t, heap->obj);
- (void)H5FL_FREE(H5HG_heap_t, heap);
+ heap = H5FL_FREE(H5HG_heap_t, heap);
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5HL.c b/src/H5HL.c
index 4b21e30..7e19180 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -72,6 +72,15 @@ static herr_t H5HL_minimize_heap_space(H5F_t *f, hid_t dxpl_id, H5HL_t *heap);
/* Package Variables */
/*********************/
+/* Declare a free list to manage the H5HL_free_t struct */
+H5FL_DEFINE(H5HL_free_t);
+
+/* Declare a free list to manage the H5HL_t struct */
+H5FL_DEFINE(H5HL_t);
+
+/* Declare a PQ free list to manage the heap chunk information */
+H5FL_BLK_DEFINE(lheap_chunk);
+
/*****************************/
/* Library Private Variables */
@@ -82,15 +91,6 @@ static herr_t H5HL_minimize_heap_space(H5F_t *f, hid_t dxpl_id, H5HL_t *heap);
/* Local Variables */
/*******************/
-/* Declare a free list to manage the H5HL_free_t struct */
-H5FL_DEFINE(H5HL_free_t);
-
-/* Declare a free list to manage the H5HL_t struct */
-H5FL_DEFINE(H5HL_t);
-
-/* Declare a PQ free list to manage the heap chunk information */
-H5FL_BLK_DEFINE(lheap_chunk);
-
/*-------------------------------------------------------------------------
@@ -359,7 +359,7 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
HDassert(H5F_addr_defined(addr));
if(NULL == (ret_value = (H5HL_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, rw)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "unable to load heap")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to load heap")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -891,7 +891,7 @@ H5HL_get_size(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t *size)
/* Get heap pointer */
if(NULL == (heap = (H5HL_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_READ)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load heap")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load heap")
/* Set the size to return */
*size = heap->heap_alloc;
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 449e166..6c2b3dc 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -76,6 +76,16 @@ static herr_t H5HL_clear(H5F_t *f, H5HL_t *heap, hbool_t destroy);
/* Package Variables */
/*********************/
+/* H5HL inherits cache-like properties from H5AC */
+const H5AC_class_t H5AC_LHEAP[1] = {{
+ H5AC_LHEAP_ID,
+ (H5AC_load_func_t)H5HL_load,
+ (H5AC_flush_func_t)H5HL_flush,
+ (H5AC_dest_func_t)H5HL_dest,
+ (H5AC_clear_func_t)H5HL_clear,
+ (H5AC_size_func_t)H5HL_size,
+}};
+
/*****************************/
/* Library Private Variables */
@@ -86,15 +96,6 @@ static herr_t H5HL_clear(H5F_t *f, H5HL_t *heap, hbool_t destroy);
/* Local Variables */
/*******************/
-/* H5HL inherits cache-like properties from H5AC */
-const H5AC_class_t H5AC_LHEAP[1] = {{
- H5AC_LHEAP_ID,
- (H5AC_load_func_t)H5HL_load,
- (H5AC_flush_func_t)H5HL_flush,
- (H5AC_dest_func_t)H5HL_dest,
- (H5AC_clear_func_t)H5HL_clear,
- (H5AC_size_func_t)H5HL_size,
-}};
/*-------------------------------------------------------------------------
@@ -403,9 +404,9 @@ H5HL_dest(H5F_t *f, H5HL_t *heap)
while(heap->freelist) {
fl = heap->freelist;
heap->freelist = fl->next;
- (void)H5FL_FREE(H5HL_free_t, fl);
+ fl = H5FL_FREE(H5HL_free_t, fl);
} /* end while */
- (void)H5FL_FREE(H5HL_t, heap);
+ heap = H5FL_FREE(H5HL_t, heap);
done:
FUNC_LEAVE_NOAPI(ret_value)