summaryrefslogtreecommitdiffstats
path: root/src/H5Rint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Rint.c')
-rw-r--r--src/H5Rint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 40f48a1..00ea82f 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -1041,12 +1041,13 @@ H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref)
FUNC_ENTER_PACKAGE
+ /* Sanity checks */
HDassert(buf);
HDassert(nbytes);
HDassert(ref);
- buf_size = *nbytes;
/* Don't decode if buffer size isn't big enough */
+ buf_size = *nbytes;
if (buf_size < H5R_ENCODE_HEADER_SIZE)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small")
@@ -1107,6 +1108,7 @@ H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref)
H5R_LOG_DEBUG("Decoded reference, filename=%s, obj_addr=%s, encode size=%u", ref->info.obj.filename,
H5R__print_token(ref->info.obj.token), ref->encode_size);
+ /* Set output info */
*nbytes = decode_size;
done: