summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2011-09-02 15:06:01 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2011-09-02 15:06:01 (GMT)
commitd47f033ad7c3b1201aa8b217d0ad008d0990eb20 (patch)
treeb26dcfca409b2b5115a4e5b6ecd79795e2179e20 /tools
parentf805181423939519e85c107784ffb3b360f4e993 (diff)
downloadhdf5-d47f033ad7c3b1201aa8b217d0ad008d0990eb20.zip
hdf5-d47f033ad7c3b1201aa8b217d0ad008d0990eb20.tar.gz
hdf5-d47f033ad7c3b1201aa8b217d0ad008d0990eb20.tar.bz2
[svn-r21355] Purpose:
HDFFV-2511 - GMQS: h5repack: some tests failed in -q32 AIX Description: - Need to be Merged from HDF5 trunk r21283 also, which was missed from previous checkin. - Previously Merged from HDF5 trunk r21265 - Added macro to handle failure in H5Dread/write when memory allocation failed inside the library. Add graceful error message when lack of memory error occurs from HDF5 lib. (XCAO) Tested: jam (linux32-LE), koala (linux64-LE)
Diffstat (limited to 'tools')
-rw-r--r--tools/h5repack/h5repack_copy.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 01a7ba2..9a09b9e 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -40,13 +40,10 @@
H5E_BEGIN_TRY { \
if(_fun(_did, _mtid, _msid, _fsid, _pid, _buf) < 0) { \
int _err_num = 0; \
- char *_msg = NULL; \
+ char _msg[80]; \
H5Ewalk2(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, &_err_num); \
- _msg = H5Eget_major(_err_num); \
- if (_msg) { \
- error_msg("%s %s -- %s\n", #_fun, "failed", _msg); \
- free(_msg); \
- } \
+ H5Eget_msg(_err_num, NULL, _msg, 80); \
+ error_msg("%s %s -- %s\n", #_fun, "failed", _msg); \
goto error; \
} \
} H5E_END_TRY; \