summaryrefslogtreecommitdiffstats
path: root/src/H5RS.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-11-23 16:18:26 (GMT)
committerGitHub <noreply@github.com>2020-11-23 16:18:26 (GMT)
commit5ff09ae971cdb8a85c596520666c8dc178541e4a (patch)
tree56cd3f440387a7bd29938a8fc150a2073bc50e19 /src/H5RS.c
parentd4a3097ec5d9e44d377c4b91a05b3e0c5f9f1e2c (diff)
downloadhdf5-5ff09ae971cdb8a85c596520666c8dc178541e4a.zip
hdf5-5ff09ae971cdb8a85c596520666c8dc178541e4a.tar.gz
hdf5-5ff09ae971cdb8a85c596520666c8dc178541e4a.tar.bz2
Basic alignment with async branch (#115)
* Basic alignment with async branch - trivial changes to reduce clutter in overall diff. * Update minor error code to reflect change within library * Update the error output to match library
Diffstat (limited to 'src/H5RS.c')
-rw-r--r--src/H5RS.c41
1 files changed, 36 insertions, 5 deletions
diff --git a/src/H5RS.c b/src/H5RS.c
index 0a62954..0e8ab27 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -18,9 +18,21 @@
*
*/
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5RSprivate.h" /* Reference-counted strings */
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5RSprivate.h" /* Reference-counted strings */
+
+/****************/
+/* Local Macros */
+/****************/
+
+/******************/
+/* Local Typedefs */
+/******************/
/* Private typedefs & structs */
struct H5RS_str_t {
@@ -29,6 +41,25 @@ struct H5RS_str_t {
unsigned n; /* Reference count of number of pointers sharing string */
};
+/********************/
+/* Package Typedefs */
+/********************/
+
+/********************/
+/* Local Prototypes */
+/********************/
+/*********************/
+/* Package Variables */
+/*********************/
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/* Declare a free list to manage the H5RS_str_t struct */
H5FL_DEFINE_STATIC(H5RS_str_t);
@@ -135,13 +166,13 @@ done:
H5RS_str_t *
H5RS_wrap(const char *s)
{
- H5RS_str_t *ret_value; /* Return value */
+ H5RS_str_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Allocate ref-counted string structure */
if (NULL == (ret_value = H5FL_MALLOC(H5RS_str_t)))
- HGOTO_ERROR(H5E_RS, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Set the internal fields */
ret_value->s = (char *)s;