summaryrefslogtreecommitdiffstats
path: root/src/H5I.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-07-03 17:00:01 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-07-03 17:00:01 (GMT)
commit153444fed7bd9dfb2b7d90a47c79d11bd1188e96 (patch)
treeec623ec5a7ebeca40c7195d2f698c9f6a95192da /src/H5I.c
parent3a6668b2f948d266bf7c99d641c331ff09021ceb (diff)
downloadhdf5-153444fed7bd9dfb2b7d90a47c79d11bd1188e96.zip
hdf5-153444fed7bd9dfb2b7d90a47c79d11bd1188e96.tar.gz
hdf5-153444fed7bd9dfb2b7d90a47c79d11bd1188e96.tar.bz2
[svn-r8800] Purpose:
Code cleanup Description: Fix problems when compiling with C++ compiler. Also clean up some warnings with gcc 3.4.x Platforms tested: FreeBSD 4.10 (sleipnir) Too minor to require h5committest
Diffstat (limited to 'src/H5I.c')
-rw-r--r--src/H5I.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5I.c b/src/H5I.c
index 125ab93..3beed36 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -439,9 +439,7 @@ herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members)
FUNC_ENTER_API(H5Inmembers, FAIL);
if( H5I_IS_LIB_TYPE( type ) )
- {
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type");
- }
/* Validate parameters. This needs to be done here, instead of letting
* the private interface handle it, because the public interface throws
@@ -454,10 +452,12 @@ herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members)
if (num_members)
{
- *num_members = H5I_nmembers(type);
+ int members;
- if (*num_members < 0)
- ret_value = FAIL;
+ if ((members = H5I_nmembers(type)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTCOUNT, FAIL, "can't compute number of members");
+
+ *num_members=(hsize_t)members;
}
done: