summaryrefslogtreecommitdiffstats
path: root/src/H5Ffake.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-01 15:29:53 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-01 15:29:53 (GMT)
commitec8ad09125032c9c232878d02e90aa86df162841 (patch)
tree5d63105d3a0db7d5bbee41c5b74b097649a2115e /src/H5Ffake.c
parent453238e90e1574ef1c15e3c79f7fb3d77920e77c (diff)
downloadhdf5-ec8ad09125032c9c232878d02e90aa86df162841.zip
hdf5-ec8ad09125032c9c232878d02e90aa86df162841.tar.gz
hdf5-ec8ad09125032c9c232878d02e90aa86df162841.tar.bz2
Source formatted
Diffstat (limited to 'src/H5Ffake.c')
-rw-r--r--src/H5Ffake.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/H5Ffake.c b/src/H5Ffake.c
index 36fea5b..6892e49 100644
--- a/src/H5Ffake.c
+++ b/src/H5Ffake.c
@@ -11,17 +11,15 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include "H5Fmodule.h" /* This source code file is part of the H5F module */
-
+#include "H5Fmodule.h" /* This source code file is part of the H5F module */
/* Packages needed by this file... */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
/* PRIVATE PROTOTYPES */
-
/*-------------------------------------------------------------------------
* Function: H5F_fake_alloc
*
@@ -41,19 +39,19 @@
H5F_t *
H5F_fake_alloc(uint8_t sizeof_size)
{
- H5F_t *f = NULL; /* Pointer to fake file struct */
- H5F_t *ret_value = NULL; /* Return value */
+ H5F_t *f = NULL; /* Pointer to fake file struct */
+ H5F_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Allocate faked file struct */
- if(NULL == (f = H5FL_CALLOC(H5F_t)))
- HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure")
- if(NULL == (f->shared = H5FL_CALLOC(H5F_shared_t)))
- HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure")
+ if (NULL == (f = H5FL_CALLOC(H5F_t)))
+ HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure")
+ if (NULL == (f->shared = H5FL_CALLOC(H5F_shared_t)))
+ HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure")
/* Only set fields necessary for clients */
- if(sizeof_size == 0)
+ if (sizeof_size == 0)
f->shared->sizeof_size = H5F_OBJ_SIZE_SIZE;
else
f->shared->sizeof_size = sizeof_size;
@@ -62,13 +60,12 @@ H5F_fake_alloc(uint8_t sizeof_size)
ret_value = f;
done:
- if(!ret_value)
+ if (!ret_value)
H5F_fake_free(f);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_fake_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5F_fake_free
*
@@ -88,13 +85,12 @@ H5F_fake_free(H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free faked file struct */
- if(f) {
+ if (f) {
/* Destroy shared file struct */
- if(f->shared)
+ if (f->shared)
f->shared = H5FL_FREE(H5F_shared_t, f->shared);
f = H5FL_FREE(H5F_t, f);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5F_fake_free() */
-