mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[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
This commit is contained in:
parent
80408e40e3
commit
d7684581aa
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user