summaryrefslogtreecommitdiffstats
path: root/src/H5FScache.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-12-14 02:16:54 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-12-14 02:16:54 (GMT)
commit91f01bd7025b796ada843cf786e3a660a7886106 (patch)
treebca7c5091915a0dc6a2b4c4410309d1aa1544d32 /src/H5FScache.c
parentabf03a6c650928881a6c929312d1e4f50101d50e (diff)
downloadhdf5-91f01bd7025b796ada843cf786e3a660a7886106.zip
hdf5-91f01bd7025b796ada843cf786e3a660a7886106.tar.gz
hdf5-91f01bd7025b796ada843cf786e3a660a7886106.tar.bz2
[svn-r28614] Normalization of H5FS package with revise_chunks.
Mostly minor fixes like warnings, etc. Tested on: Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 serial only (these changes have been in revise_chunks for a long time)
Diffstat (limited to 'src/H5FScache.c')
-rw-r--r--src/H5FScache.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 25a16e0..2f7dda8 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -15,11 +15,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FScache.c
- * May 2 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Created: H5FScache.c
+ * May 2 2006
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Implement file free space metadata cache methods.
+ * Purpose: Implement file free space metadata cache methods.
*
*-------------------------------------------------------------------------
*/
@@ -176,6 +176,8 @@ H5FS__cache_hdr_get_load_size(const void *_udata, size_t *image_len)
FUNC_ENTER_STATIC_NOERR
/* Check arguments */
+ HDassert(udata);
+ HDassert(udata->f);
HDassert(image_len);
/* Set the image length size */
@@ -223,24 +225,24 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t len, void *_udata,
/* Allocate a new free space manager */
if(NULL == (fspace = H5FS__new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set free space manager's internal information */
fspace->addr = udata->addr;
/* Magic number */
if(HDmemcmp(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header signature")
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header signature")
image += H5_SIZEOF_MAGIC;
/* Version */
if(*image++ != H5FS_HDR_VERSION)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header version")
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header version")
/* Client ID */
fspace->client = (H5FS_client_t)*image++;
if(fspace->client >= H5FS_NUM_CLIENT_ID)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "unknown client ID in free space header")
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "unknown client ID in free space header")
/* Total space tracked */
H5F_DECODE_LENGTH(udata->f, image, fspace->tot_space);
@@ -258,7 +260,7 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t len, void *_udata,
/* (only check if we actually have some classes) */
UINT16DECODE(image, nclasses);
if(fspace->nclasses > 0 && fspace->nclasses != nclasses)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "section class count mismatch")
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "section class count mismatch")
/* Shrink percent */
UINT16DECODE(image, fspace->shrink_percent);
@@ -822,7 +824,6 @@ H5FS__cache_sinfo_get_load_size(const void *_udata, size_t *image_len)
* it with the data contained in the image, and return a pointer to
* the new instance.
*
- *
* Return: Success: Pointer to in core representation
* Failure: NULL
*
@@ -1235,7 +1236,7 @@ done:
* Purpose: Skip list iterator callback to serialize free space sections
* of a particular size
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Monday, May 8, 2006
@@ -1291,7 +1292,7 @@ done:
* Purpose: Skip list iterator callback to serialize free space sections
* in a bin
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Monday, May 8, 2006
@@ -1329,4 +1330,3 @@ H5FS__sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS__sinfo_serialize_node_cb() */
-