summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2002-01-09 17:14:05 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2002-01-09 17:14:05 (GMT)
commitd7684581aafdd8e12fe1148e5f1ba729b3dce7a5 (patch)
tree15352f99ca6ec9190f6a548ab5b42021c04adbb3 /c++
parent80408e40e38ac566945accdb859343e75bedce3e (diff)
downloadhdf5-d7684581aafdd8e12fe1148e5f1ba729b3dce7a5.zip
hdf5-d7684581aafdd8e12fe1148e5f1ba729b3dce7a5.tar.gz
hdf5-d7684581aafdd8e12fe1148e5f1ba729b3dce7a5.tar.bz2
[svn-r4805]
Purpose: Bug fix Description: In several if statements, '>' was used in place of '<='. This caused exceptions thrown inappropriately. Replaced '>' by '<=' where applicable. Platforms tested: SunOS 5.7 (arabica) Windows 98
Diffstat (limited to 'c++')
-rw-r--r--c++/src/H5CommonFG.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 80cfb66..b387b82 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -48,7 +48,7 @@ Group CommonFG::createGroup( const char* name, size_t size_hint ) const
hid_t group_id = H5Gcreate( getLocId(), name, size_hint );
// If the creation of the group failed, throw an exception
- if( group_id > 0 )
+ if( group_id <= 0 )
{
throwException("createGroup", "H5Gcreate failed");
}
@@ -97,7 +97,9 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co
// If the creation of the dataset failed, throw an exception
if( dataset_id <= 0 )
+ {
throwException("createDataSet", "H5Dcreate failed");
+ }
// No failure, create and return the DataSet object
DataSet dataset( dataset_id );