diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2016-09-16 03:37:43 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2016-09-16 03:37:43 (GMT) |
commit | 99e4f3f08c530c1d90b59788984b4fefc61f0f92 (patch) | |
tree | 60cf0f73d022fe202f663866631cae09c862bf6c /src | |
parent | 13e2f178c8832792bd0e30fc69e362306ce9f205 (diff) | |
download | hdf5-99e4f3f08c530c1d90b59788984b4fefc61f0f92.zip hdf5-99e4f3f08c530c1d90b59788984b4fefc61f0f92.tar.gz hdf5-99e4f3f08c530c1d90b59788984b4fefc61f0f92.tar.bz2 |
Merge fix for HDFFV-7991 from trunk to 1.18
Modifications made based on comments from pull request review.
Tested on mayll, platypus, osx1010test, emu, kituo, kite, quail, moohan, ostrich.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Aint.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c index 3cc8115..5c5be39 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -2098,11 +2098,11 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si HDmemcpy(buf, attr_src->shared->data, attr_src->shared->data_size); - /* Allocate background memory */ - if(H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst)) { - if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed") - } + /* Allocate background memory */ + if(H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst)) { + if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size))) + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed") + } /* Convert from source file to memory */ if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg_buf, dxpl_id) < 0) @@ -2110,9 +2110,9 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si HDmemcpy(reclaim_buf, buf, buf_size); - /* Set background buffer to all zeros */ - if(bkg_buf) - HDmemset(bkg_buf, 0, buf_size); + /* Set background buffer to all zeros */ + if(bkg_buf) + HDmemset(bkg_buf, 0, buf_size); /* Convert from memory to destination file */ if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg_buf, dxpl_id) < 0) |