summaryrefslogtreecommitdiffstats
path: root/src/H5Ffake.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-03-25 00:39:37 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-03-25 00:39:37 (GMT)
commitfeb20aac304b39e18c70f88cae2f7cf7d5c82db2 (patch)
treee15d7e751af4e3c42e77ea955d91db4cf27a71cf /src/H5Ffake.c
parentbdac2ecdbff2c389a222b3d93ff1eb1d23ec6b23 (diff)
downloadhdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.zip
hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.gz
hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.bz2
Formats the source and updates the gcc warning pragmas
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 67bd180..01a0056 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
*
@@ -42,19 +40,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;
@@ -63,13 +61,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
*
@@ -90,13 +87,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() */
-