summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_utils.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-09-06 17:36:26 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-09-06 17:36:26 (GMT)
commit0b070ae114172588756d2c8732ccb7c89eb08ab6 (patch)
treebc63dbf62358e0f49460c59bf77e32a031045d3c /tools/lib/h5tools_utils.c
parenta57f039a6aae04b8f91955e92ddbaa74cc78fc2b (diff)
downloadhdf5-0b070ae114172588756d2c8732ccb7c89eb08ab6.zip
hdf5-0b070ae114172588756d2c8732ccb7c89eb08ab6.tar.gz
hdf5-0b070ae114172588756d2c8732ccb7c89eb08ab6.tar.bz2
HDFFV-10282 refactor out assert calls in tools
Diffstat (limited to 'tools/lib/h5tools_utils.c')
-rw-r--r--tools/lib/h5tools_utils.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 4084be0..60d7732 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -12,20 +12,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Bill Wendling <wendling@ncsa.uiuc.edu>
- * Tuesday, 6. March 2001
- */
-
-/*
* Portions of this work are derived from _Obfuscated C and Other Mysteries_,
* by Don Libes, copyright (c) 1993 by John Wiley & Sons, Inc.
*/
-#include <ctype.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
#include "h5tools.h"
#include "h5tools_utils.h"
#include "H5private.h"
@@ -618,7 +608,6 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
- HDassert(0);
break;
} /* end switch */
@@ -787,8 +776,11 @@ H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_
} /* end if */
/* trg_path must be freed out of this function when finished using */
- link_info->trg_path = (char*)HDcalloc(link_info->linfo.u.val_size, sizeof(char));
- HDassert(link_info->trg_path);
+ if((link_info->trg_path = (char*)HDcalloc(link_info->linfo.u.val_size, sizeof(char))) == NULL) {
+ if(link_info->opt.msg_mode == 1)
+ parallel_print("Warning: unable to allocate buffer for <%s>\n",linkpath);
+ goto out;
+ } /* end if */
/* get link value */
if(H5Lget_val(file_id, linkpath, (void *)link_info->trg_path, link_info->linfo.u.val_size, H5P_DEFAULT) < 0) {