diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-07-09 15:16:46 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-07-09 15:16:46 (GMT) |
commit | 46b5d073b56090829f6f6519553b4a427703e129 (patch) | |
tree | 78087e067c6b941a1cd3e4c5e21f3a77d5e8f896 /src/H5VLiod_encdec.c | |
parent | e74f49bdc142517aab4ab2e6823edef186895971 (diff) | |
download | hdf5-46b5d073b56090829f6f6519553b4a427703e129.zip hdf5-46b5d073b56090829f6f6519553b4a427703e129.tar.gz hdf5-46b5d073b56090829f6f6519553b4a427703e129.tar.bz2 |
[svn-r23876] - Add functionality to generate IOD hyperslabs for HDF5 dataspace selections
- Fix some bugs & valgrind warnings
Diffstat (limited to 'src/H5VLiod_encdec.c')
-rw-r--r-- | src/H5VLiod_encdec.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5VLiod_encdec.c b/src/H5VLiod_encdec.c index 5652716..c342984 100644 --- a/src/H5VLiod_encdec.c +++ b/src/H5VLiod_encdec.c @@ -19,6 +19,8 @@ */ #include "H5MMprivate.h" /* Memory management */ +#include "H5Ppublic.h" +#include "H5Spublic.h" #include "H5VLiod_common.h" /* IOD Common Header */ #ifdef H5_HAVE_EFF @@ -176,7 +178,7 @@ int hg_proc_dims_t(hg_proc_t proc, void *data) break; case HG_DECODE: if(struct_data->rank) - struct_data->size = malloc (sizeof(hsize_t) * struct_data->rank); + struct_data->size = (hsize_t *)malloc (sizeof(hsize_t) * struct_data->rank); for(i=0 ; i<struct_data->rank ; i++) { ret = hg_proc_uint64_t(proc, &struct_data->size[i]); @@ -204,7 +206,8 @@ int hg_proc_name_t(hg_proc_t proc, void *data) size_t size; name_t *struct_data = (name_t *) data; - ret = hg_proc_int64_t(proc, struct_data->value_size); + ret = hg_proc_memcpy(proc, struct_data->value_size, sizeof(ssize_t)); + //ret = hg_proc_int64_t(proc, struct_data->value_size); if (ret != HG_SUCCESS) { HG_ERROR_DEFAULT("Proc error"); ret = HG_FAIL; @@ -212,7 +215,8 @@ int hg_proc_name_t(hg_proc_t proc, void *data) } size = (size_t)(*struct_data->value_size); - ret = hg_proc_uint64_t(proc, &struct_data->size); + ret = hg_proc_memcpy(proc, &struct_data->size, sizeof(size_t)); + //ret = hg_proc_uint64_t(proc, &struct_data->size); if (ret != HG_SUCCESS) { HG_ERROR_DEFAULT("Proc error"); ret = HG_FAIL; @@ -221,7 +225,7 @@ int hg_proc_name_t(hg_proc_t proc, void *data) if(NULL != struct_data->value && struct_data->size != 0) { ret = hg_proc_raw(proc, struct_data->value, - MIN(size+1, struct_data->size)); + MIN(size, struct_data->size)); if (ret != HG_SUCCESS) { HG_ERROR_DEFAULT("Proc error"); ret = HG_FAIL; |