diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-08-23 21:23:09 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-09-06 03:51:40 (GMT) |
commit | 38194b496d9a868de21c6bcc8bda3bf30690712e (patch) | |
tree | 5e4891c5d5cdf46d7e6a55db847a633f2cd88134 /src/H5Gstab.c | |
parent | ccb68f709181942106eef92e3f39575add1792e6 (diff) | |
download | hdf5-38194b496d9a868de21c6bcc8bda3bf30690712e.zip hdf5-38194b496d9a868de21c6bcc8bda3bf30690712e.tar.gz hdf5-38194b496d9a868de21c6bcc8bda3bf30690712e.tar.bz2 |
Modifications based on comments from pull request review
(1) Remove unnecessary asserts
(2) Add code to insert bad offset values to the test file in gen_bad_offset.c
Diffstat (limited to 'src/H5Gstab.c')
-rw-r--r-- | src/H5Gstab.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/H5Gstab.c b/src/H5Gstab.c index 01dbdbc..0eb7b0b 100644 --- a/src/H5Gstab.c +++ b/src/H5Gstab.c @@ -724,9 +724,8 @@ H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata) if((name = (const char *)H5HL_offset_into(udata->heap, name_off)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name") - HDassert(name); - udata->name = H5MM_strdup(name); - HDassert(udata->name); + if((udata->name = H5MM_strdup(name)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to duplicate symbol table link name") done: FUNC_LEAVE_NOAPI(ret_value) @@ -948,7 +947,6 @@ H5G_stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata) /* Get a pointer to the link name */ if((name = (const char *)H5HL_offset_into(udata->heap, ent->name_off)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name") - HDassert(name); /* Convert the entry to a link */ if(H5G__ent_to_link(udata->lnk, udata->heap, ent, name) < 0) |