summaryrefslogtreecommitdiffstats
path: root/src/H5B2stat.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2022-04-13 21:17:29 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2022-04-13 21:17:29 (GMT)
commitcabc39c3e197e2591449d2604bfee26465fb60e1 (patch)
treed5f39f5f5965584bf9bf49646a2af617adfd3e4e /src/H5B2stat.c
parent7355f4c505092a7a85474b47f18d5206028e2c95 (diff)
parentab69f5df770ee3cc6cd6c81d905a5317b894a002 (diff)
downloadhdf5-feature/coding_standards.zip
hdf5-feature/coding_standards.tar.gz
hdf5-feature/coding_standards.tar.bz2
Merge branch 'develop' into feature/coding_standardsfeature/coding_standards
Diffstat (limited to 'src/H5B2stat.c')
-rw-r--r--src/H5B2stat.c37
1 files changed, 13 insertions, 24 deletions
diff --git a/src/H5B2stat.c b/src/H5B2stat.c
index 5dd9cc2..4735276 100644
--- a/src/H5B2stat.c
+++ b/src/H5B2stat.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Monday, March 6, 2006
*
* Purpose: v2 B-tree metadata statistics functions.
@@ -22,52 +22,43 @@
/* Module Setup */
/****************/
-#include "H5B2module.h" /* This source code file is part of the H5B2 module */
-
+#include "H5B2module.h" /* This source code file is part of the H5B2 module */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5B2pkg.h" /* v2 B-trees */
-#include "H5Eprivate.h" /* Error handling */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5B2pkg.h" /* v2 B-trees */
+#include "H5Eprivate.h" /* Error handling */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5B2_stat_info
*
@@ -89,13 +80,12 @@ H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info)
HDassert(info);
/* Get information about the B-tree */
- info->depth = bt2->hdr->depth;
+ info->depth = bt2->hdr->depth;
info->nrecords = bt2->hdr->root.all_nrec;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2_stat_info() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_size
*
@@ -112,8 +102,8 @@ H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info)
herr_t
H5B2_size(H5B2_t *bt2, hsize_t *btree_size)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -131,17 +121,16 @@ H5B2_size(H5B2_t *bt2, hsize_t *btree_size)
*btree_size += hdr->hdr_size;
/* Iterate through records */
- if(hdr->root.node_nrec > 0) {
+ if (hdr->root.node_nrec > 0) {
/* Check for root node being a leaf */
- if(hdr->depth == 0)
+ if (hdr->depth == 0)
*btree_size += hdr->node_size;
else
/* Iterate through nodes */
- if(H5B2__node_size(hdr, hdr->depth, &hdr->root, hdr, btree_size) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed")
+ if (H5B2__node_size(hdr, hdr->depth, &hdr->root, hdr, btree_size) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_size() */
-