diff options
author | Quincey Koziol <koziol@lbl.gov> | 2020-11-30 23:25:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-30 23:25:40 (GMT) |
commit | ff04956a6cbdda015cb6c5239d7d6007976fd2a4 (patch) | |
tree | 7b99577556c6336d79f4beaca0df7c898b2dad08 /src/H5RS.c | |
parent | 71a42ab05e4c16f8d2915ddc131ef5892ddf9a24 (diff) | |
download | hdf5-ff04956a6cbdda015cb6c5239d7d6007976fd2a4.zip hdf5-ff04956a6cbdda015cb6c5239d7d6007976fd2a4.tar.gz hdf5-ff04956a6cbdda015cb6c5239d7d6007976fd2a4.tar.bz2 |
Basic alignment with async branch (#115) (#137)
* 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.c | 41 |
1 files changed, 36 insertions, 5 deletions
@@ -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; |