summaryrefslogtreecommitdiffstats
path: root/src/H5Tfixed.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
commitb2d661b508a7fc7a2592c13bc6bdc175551f075d (patch)
tree13baeb0d83a7c2a4c6299993c182b1227c2f6114 /src/H5Tfixed.c
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'src/H5Tfixed.c')
-rw-r--r--src/H5Tfixed.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index 5270a9a..beaee89 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -16,15 +16,13 @@
* integer) 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" /*ID functions */
+#include "H5Tpkg.h" /*data-type functions */
-#include "H5private.h" /*generic functions */
-#include "H5Eprivate.h" /*error handling */
-#include "H5Iprivate.h" /*ID functions */
-#include "H5Tpkg.h" /*data-type functions */
-
-
/*-------------------------------------------------------------------------
* Function: H5Tget_sign
*
@@ -42,14 +40,14 @@
H5T_sign_t
H5Tget_sign(hid_t type_id)
{
- H5T_t *dt = NULL;
- H5T_sign_t ret_value;
+ H5T_t * dt = NULL;
+ H5T_sign_t ret_value;
FUNC_ENTER_API(H5T_SGN_ERROR)
H5TRACE1("Ts", "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, H5T_SGN_ERROR, "not an integer datatype")
ret_value = H5T_get_sign(dt);
@@ -58,7 +56,6 @@ done:
FUNC_LEAVE_API(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5T_get_sign
*
@@ -77,19 +74,19 @@ done:
H5T_sign_t
H5T_get_sign(H5T_t const *dt)
{
- H5T_sign_t ret_value = H5T_SGN_ERROR; /* Return value */
+ H5T_sign_t ret_value = H5T_SGN_ERROR; /* Return value */
FUNC_ENTER_NOAPI(H5T_SGN_ERROR)
HDassert(dt);
/* Defer to parent */
- while(dt->shared->parent)
+ while (dt->shared->parent)
dt = dt->shared->parent;
/* Check args */
- if (H5T_INTEGER!=dt->shared->type)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5T_SGN_ERROR, "operation not defined for datatype class")
+ if (H5T_INTEGER != dt->shared->type)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5T_SGN_ERROR, "operation not defined for datatype class")
/* Sign */
ret_value = dt->shared->u.atomic.u.i.sign;
@@ -98,8 +95,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
-
/*-------------------------------------------------------------------------
* Function: H5Tset_sign
*
@@ -115,24 +110,24 @@ done:
herr_t
H5Tset_sign(hid_t type_id, H5T_sign_t sign)
{
- 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", "iTs", type_id, sign);
/* 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 an integer datatype")
- if (H5T_STATE_TRANSIENT!=dt->shared->state)
+ if (H5T_STATE_TRANSIENT != dt->shared->state)
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
if (sign < H5T_SGN_NONE || sign >= H5T_NSGN)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal sign type")
- if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)
+ if (H5T_ENUM == dt->shared->type && dt->shared->u.enumer.nmembs > 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
- if (H5T_INTEGER!=dt->shared->type)
+ if (H5T_INTEGER != dt->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for datatype class")
/* Commit */
@@ -141,4 +136,3 @@ H5Tset_sign(hid_t type_id, H5T_sign_t sign)
done:
FUNC_LEAVE_API(ret_value)
}
-