diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-09-30 14:27:10 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-09-30 14:27:10 (GMT) |
commit | b2d661b508a7fc7a2592c13bc6bdc175551f075d (patch) | |
tree | 13baeb0d83a7c2a4c6299993c182b1227c2f6114 /src/H5Tstrpad.c | |
parent | 29ab58b58dce556639ea3154e262895773a8a8df (diff) | |
download | hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2 |
Clang-format of source files
Diffstat (limited to 'src/H5Tstrpad.c')
-rw-r--r-- | src/H5Tstrpad.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/src/H5Tstrpad.c b/src/H5Tstrpad.c index 35de30b..32d2bf2 100644 --- a/src/H5Tstrpad.c +++ b/src/H5Tstrpad.c @@ -16,16 +16,13 @@ * the datatype string padding for 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 "H5Tpkg.h" /* Datatypes */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5Tpkg.h" /* Datatypes */ - - - /*------------------------------------------------------------------------- * Function: H5Tget_strpad * @@ -46,22 +43,22 @@ H5T_str_t H5Tget_strpad(hid_t type_id) { - H5T_t *dt = NULL; - H5T_str_t ret_value; + H5T_t * dt = NULL; + H5T_str_t ret_value; FUNC_ENTER_API(H5T_STR_ERROR) H5TRACE1("Tz", "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_STR_ERROR, "not a datatype") while (dt->shared->parent && !H5T_IS_STRING(dt->shared)) - dt = dt->shared->parent; /*defer to parent*/ + dt = dt->shared->parent; /*defer to parent*/ if (!H5T_IS_STRING(dt->shared)) HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_STR_ERROR, "operation not defined for datatype class") /* result */ - if(H5T_IS_FIXED_STRING(dt->shared)) + if (H5T_IS_FIXED_STRING(dt->shared)) ret_value = dt->shared->u.atomic.u.s.pad; else ret_value = dt->shared->u.vlen.pad; @@ -70,7 +67,6 @@ done: FUNC_LEAVE_API(ret_value) } - /*------------------------------------------------------------------------- * Function: H5Tset_strpad * @@ -99,26 +95,26 @@ done: herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad) { - 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", "iTz", type_id, strpad); /* 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 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 (strpad < H5T_STR_NULLTERM || strpad >= H5T_NSTR) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal string pad type") while (dt->shared->parent && !H5T_IS_STRING(dt->shared)) - dt = dt->shared->parent; /*defer to parent*/ + dt = dt->shared->parent; /*defer to parent*/ if (!H5T_IS_STRING(dt->shared)) HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class") /* Commit */ - if(H5T_IS_FIXED_STRING(dt->shared)) + if (H5T_IS_FIXED_STRING(dt->shared)) dt->shared->u.atomic.u.s.pad = strpad; else dt->shared->u.vlen.pad = strpad; @@ -126,4 +122,3 @@ H5Tset_strpad(hid_t type_id, H5T_str_t strpad) done: FUNC_LEAVE_API(ret_value) } - |