summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Pf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src/H5Pf.c')
-rw-r--r--fortran/src/H5Pf.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index c3bd709..54f99d0 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -2278,7 +2278,7 @@ nh5pregisterc_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, _fcd
/*----------------------------------------------------------------------------
* Name: h5pregister_c
- * Purpose: Call H5Pregister to registers a permanent property
+ * Purpose: Call H5Pregister2 to registers a permanent property
* Inputs: class - property list class identifier
* name - name of the new property
* name_len - length of the "name" buffer
@@ -2292,24 +2292,22 @@ nh5pregisterc_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, _fcd
int_f
nh5pregister_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, void UNUSED *value)
{
+ char* c_name = NULL;
int_f ret_value = -1;
- hid_t c_class;
- char* c_name;
- size_t c_size;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
- c_size = (size_t)*size;
- c_class = (hid_t)*class;
+ if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
+ goto DONE;
/*
- * Call H5Pregister function.
+ * Call H5Pregister2 function.
*/
- if( H5Pregister(c_class, c_name, c_size, value, NULL,NULL,NULL,NULL,NULL,NULL,NULL) <0) goto DONE;
+ if(H5Pregister2((hid_t)*class, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ goto DONE;
ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
+ if(c_name != NULL)
+ HDfree(c_name);
return ret_value;
}