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-08-30 15:27:03 (GMT) |
commit | b9f294a9440d72ce55cd85340583a56b10c1de25 (patch) | |
tree | aa642f2271bdf42df8ded355a625304e171839f4 /src/H5Gstab.c | |
parent | f6c94f3ba60d071ce1ba8b731a66e47fbc39c095 (diff) | |
download | hdf5-b9f294a9440d72ce55cd85340583a56b10c1de25.zip hdf5-b9f294a9440d72ce55cd85340583a56b10c1de25.tar.gz hdf5-b9f294a9440d72ce55cd85340583a56b10c1de25.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 7750671..4dc06ca 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) |