diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-10-05 13:46:42 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-10-05 13:46:42 (GMT) |
commit | c7c6623f284545f6605120c171e0c13da9d43b3e (patch) | |
tree | f87a54778343994246cf404b40eb4aa0fe4017cb /src/H5S.c | |
parent | 914643490ab581c4b0bb78ca30a8e1fa520b4d6d (diff) | |
download | hdf5-c7c6623f284545f6605120c171e0c13da9d43b3e.zip hdf5-c7c6623f284545f6605120c171e0c13da9d43b3e.tar.gz hdf5-c7c6623f284545f6605120c171e0c13da9d43b3e.tar.bz2 |
[svn-r27956] Description:
Minor code cleanups, preparing to merge to trunk.
Tested on:
MacOSX/64 10.10.5 (amazon) w/serial & parallel
(h5committest not required on this branch)
Diffstat (limited to 'src/H5S.c')
-rw-r--r-- | src/H5S.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1577,7 +1577,6 @@ herr_t H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) { H5F_t *f = NULL; /* Fake file structure*/ - unsigned char *pp = (*p); /* Local pointer for decoding */ size_t extent_size; /* Size of serialized dataspace extent */ hssize_t sselect_size; /* Signed size of serialized dataspace selection */ size_t select_size; /* Size of serialized dataspace selection */ @@ -1600,9 +1599,11 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) /* Verify the size of buffer. If it's not big enough, simply return the * right size without filling the buffer. */ - if(!pp || *nalloc < (extent_size + select_size + 1 + 1 + 1 + 4)) + if(!*p || *nalloc < (extent_size + select_size + 1 + 1 + 1 + 4)) *nalloc = extent_size + select_size + 1 + 1 + 1 + 4; else { + unsigned char *pp = (*p); /* Local pointer for decoding */ + /* Encode the type of the information */ *pp++ = H5O_SDSPACE_ID; |