diff options
author | Sean McBride <sean@rogue-research.com> | 2023-08-02 13:39:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 13:39:15 (GMT) |
commit | 2b0badb90e4e516d0758efbd8ec96449188c7249 (patch) | |
tree | 074e38039b95ca7121a0117069974eff52a04519 /src/H5Odrvinfo.c | |
parent | 56451503c55ef6e5f67fc3bb710f9e5b649b1af2 (diff) | |
download | hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.zip hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.gz hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.bz2 |
Made HGOTO_ERROR a do-while loop (#3308)
* Made HGOTO_ERROR a do-while loop
Diffstat (limited to 'src/H5Odrvinfo.c')
-rw-r--r-- | src/H5Odrvinfo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c index 566e26b..36a1ba5 100644 --- a/src/H5Odrvinfo.c +++ b/src/H5Odrvinfo.c @@ -84,11 +84,11 @@ H5O__drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (*p++ != H5O_DRVINFO_VERSION) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message"); /* Allocate space for message */ if (NULL == (mesg = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info message") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info message"); /* Retrieve driver name */ if (H5_IS_BUFFER_OVERFLOW(p, 8, p_end)) @@ -106,7 +106,7 @@ H5O__drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, /* Allocate space for buffer */ if (NULL == (mesg->buf = (uint8_t *)H5MM_malloc(mesg->len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info buffer"); /* Copy encoded driver info into buffer */ if (H5_IS_BUFFER_OVERFLOW(p, mesg->len, p_end)) @@ -183,7 +183,7 @@ H5O__drvinfo_copy(const void *_mesg, void *_dest) if (!dest && NULL == (dest = (H5O_drvinfo_t *)H5MM_malloc(sizeof(H5O_drvinfo_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for shared message table message") + "memory allocation failed for shared message table message"); /* Shallow copy the fields */ *dest = *mesg; @@ -192,7 +192,7 @@ H5O__drvinfo_copy(const void *_mesg, void *_dest) if (NULL == (dest->buf = (uint8_t *)H5MM_malloc(mesg->len))) { if (dest != _dest) dest = (H5O_drvinfo_t *)H5MM_xfree(dest); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } /* end if */ H5MM_memcpy(dest->buf, mesg->buf, mesg->len); |