summaryrefslogtreecommitdiffstats
path: root/src/H5Topaque.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Topaque.c')
-rw-r--r--src/H5Topaque.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index f7ce977..f3cd889 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -16,17 +16,14 @@
* datatypes in the H5T interface.
*/
-#include "H5Tmodule.h" /* This source code file is part of the H5T module */
+#include "H5Tmodule.h" /* This source code file is part of the H5T module */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Tpkg.h" /* Datatypes */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Tpkg.h" /* Datatypes */
-
-
-
/*-------------------------------------------------------------------------
* Function: H5Tset_tag
*
@@ -42,20 +39,20 @@
herr_t
H5Tset_tag(hid_t type_id, const char *tag)
{
- H5T_t *dt=NULL;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5T_t *dt = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", type_id, tag);
/* Check args */
- if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
- if (H5T_STATE_TRANSIENT!=dt->shared->state)
+ if (H5T_STATE_TRANSIENT != dt->shared->state)
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
- if (H5T_OPAQUE!=dt->shared->type)
+ if (H5T_OPAQUE != dt->shared->type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type")
if (!tag)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag")
@@ -70,7 +67,6 @@ done:
FUNC_LEAVE_API(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5Tget_tag
*
@@ -87,14 +83,14 @@ done:
char *
H5Tget_tag(hid_t type_id)
{
- H5T_t *dt=NULL;
- char *ret_value;
+ H5T_t *dt = NULL;
+ char * ret_value;
FUNC_ENTER_API(NULL)
H5TRACE1("*s", "i", type_id);
/* Check args */
- if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
@@ -102,10 +98,9 @@ H5Tget_tag(hid_t type_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class")
/* result */
- if (NULL==(ret_value=H5MM_strdup(dt->shared->u.opaque.tag)))
+ if (NULL == (ret_value = H5MM_strdup(dt->shared->u.opaque.tag)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
done:
FUNC_LEAVE_API(ret_value)
}
-