summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPeter Cao <xcao@hdfgroup.org>2011-08-22 16:05:42 (GMT)
committerPeter Cao <xcao@hdfgroup.org>2011-08-22 16:05:42 (GMT)
commit80a409e14dc85f8bdb0dff424f528d3a0bcf7891 (patch)
treedd56ed153a6742318fba82e3491ec3d11a254b6d /tools
parent39a79934ca360648ae017239180a7787e013d94f (diff)
downloadhdf5-80a409e14dc85f8bdb0dff424f528d3a0bcf7891.zip
hdf5-80a409e14dc85f8bdb0dff424f528d3a0bcf7891.tar.gz
hdf5-80a409e14dc85f8bdb0dff424f528d3a0bcf7891.tar.bz2
[svn-r21283] H5Eget_major() is depreciated. use the H5Eget_msg() instead.
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 c40b7c2..8b2a1aa 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; \