summaryrefslogtreecommitdiffstats
path: root/hl/src/H5PT.c
diff options
context:
space:
mode:
Diffstat (limited to 'hl/src/H5PT.c')
-rw-r--r--hl/src/H5PT.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c
index 2119cca..3d16db5 100644
--- a/hl/src/H5PT.c
+++ b/hl/src/H5PT.c
@@ -33,10 +33,10 @@ static H5I_type_t H5PT_ptable_id_type = H5I_UNINIT;
#define H5PT_HASH_TABLE_SIZE 64
/* Packet Table private functions */
-herr_t H5PT_close( htbl_t* table );
-herr_t H5PT_create_index(htbl_t *table_id);
-herr_t H5PT_set_index(htbl_t *table_id, hsize_t pt_index);
-herr_t H5PT_get_index(htbl_t *table_id, hsize_t *pt_index);
+static herr_t H5PT_close( htbl_t* table );
+static herr_t H5PT_create_index(htbl_t *table_id);
+static herr_t H5PT_set_index(htbl_t *table_id, hsize_t pt_index);
+static herr_t H5PT_get_index(htbl_t *table_id, hsize_t *pt_index);
/*-------------------------------------------------------------------------
*
@@ -269,6 +269,8 @@ hid_t H5PTopen( hid_t loc_id,
goto out;
if( H5Sget_simple_extent_dims( space_id, dims, NULL) < 0)
goto out;
+ if(H5Sclose(space_id) < 0)
+ goto out;
table->size = dims[0];
/* Get an ID for this table */
@@ -284,6 +286,7 @@ hid_t H5PTopen( hid_t loc_id,
out:
H5E_BEGIN_TRY
H5Tclose(type_id);
+ H5Sclose(space_id);
if(table)
{
H5Dclose(table->dset_id);
@@ -314,7 +317,8 @@ out:
*
*-------------------------------------------------------------------------
*/
-herr_t H5PT_close( htbl_t* table)
+static herr_t
+H5PT_close( htbl_t* table)
{
if(table == NULL)
goto out;
@@ -567,7 +571,8 @@ out:
*
*-------------------------------------------------------------------------
*/
-herr_t H5PT_create_index(htbl_t *table)
+static herr_t
+H5PT_create_index(htbl_t *table)
{
if( table != NULL)
{
@@ -577,7 +582,8 @@ herr_t H5PT_create_index(htbl_t *table)
return -1;
}
-herr_t H5PT_set_index(htbl_t *table, hsize_t index)
+static herr_t
+H5PT_set_index(htbl_t *table, hsize_t index)
{
/* Ensure index is valid */
if( table != NULL )
@@ -591,7 +597,8 @@ herr_t H5PT_set_index(htbl_t *table, hsize_t index)
return -1;
}
-herr_t H5PT_get_index(htbl_t *table, hsize_t *index)
+static herr_t
+H5PT_get_index(htbl_t *table, hsize_t *index)
{
/* Ensure index is valid */
if( table != NULL )