summaryrefslogtreecommitdiffstats
path: root/c++/src/H5CompType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5CompType.cpp')
-rw-r--r--c++/src/H5CompType.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index 708d273..8d99b78 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -81,7 +81,7 @@ CompType::CompType( const DataSet& dataset ) : DataType()
id = H5Dget_type( dataset.getId() );
// If the datatype id is invalid, throw exception
- if( id <= 0 )
+ if( id < 0 )
{
throw DataSetIException("CompType constructor", "H5Dget_type failed");
}
@@ -195,7 +195,7 @@ H5T_class_t CompType::getMemberClass( unsigned member_num ) const
{
// get the member datatype first
hid_t member_type_id = H5Tget_member_type( id, member_num );
- if( member_type_id <= 0 )
+ if( member_type_id < 0 )
{
throw DataTypeIException("CompType::getMemberClass",
"H5Tget_member_type failed");