summaryrefslogtreecommitdiffstats
path: root/src/H5Gdeprec.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-04-19 15:58:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-04-19 15:58:18 (GMT)
commitbb184fb19eacab67fabfd0a468944165c7e31348 (patch)
tree3adbc7c7c0f5266441a89feb4711792e68bf9520 /src/H5Gdeprec.c
parenta68bc7f2050cb828a9e750923d33db44c1c5c708 (diff)
downloadhdf5-bb184fb19eacab67fabfd0a468944165c7e31348.zip
hdf5-bb184fb19eacab67fabfd0a468944165c7e31348.tar.gz
hdf5-bb184fb19eacab67fabfd0a468944165c7e31348.tar.bz2
[svn-r20556] Description:
Bring r20553 from trunk to 1.8 branch: Revert part of r20536 that was part of a Coverity merge. Tested on: Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode (h5committested on trunk)
Diffstat (limited to 'src/H5Gdeprec.c')
-rw-r--r--src/H5Gdeprec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 9a0c1a2..966410f 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -902,7 +902,7 @@ H5G_get_objinfo_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char *name, const H5O_
FUNC_ENTER_NOAPI_NOINIT(H5G_get_objinfo_cb)
/* Check if the name in this group resolved to a valid link */
- if(lnk == NULL || obj_loc == NULL)
+ if(lnk == NULL && obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "'%s' doesn't exist", name)
/* Only modify user's buffer if it's available */
@@ -910,7 +910,7 @@ H5G_get_objinfo_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char *name, const H5O_
H5G_stat_t *statbuf = udata->statbuf; /* Convenience pointer for statbuf */
/* Common code to retrieve the file's fileno */
- if(H5F_get_fileno(obj_loc->oloc->file, &statbuf->fileno[0]) < 0)
+ if(H5F_get_fileno((obj_loc ? obj_loc : grp_loc)->oloc->file, &statbuf->fileno[0]) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unable to read fileno")
/* Info for soft and UD links is gotten by H5L_get_info. If we have
@@ -921,6 +921,7 @@ H5G_get_objinfo_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char *name, const H5O_
/* Go retrieve the object information */
/* (don't need index & heap info) */
+ HDassert(obj_loc);
if(H5O_get_info(obj_loc->oloc, udata->dxpl_id, FALSE, &oinfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object info")