summaryrefslogtreecommitdiffstats
path: root/hl/src/H5LT.c
diff options
context:
space:
mode:
Diffstat (limited to 'hl/src/H5LT.c')
-rw-r--r--hl/src/H5LT.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 8ee7fd0..717352f 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -1299,31 +1299,26 @@ herr_t H5LT_open_id( hid_t loc_id,
const char *obj_name,
int obj_type /*basic object type*/ )
{
+ hid_t obj_id = -1;
- hid_t obj_id = -1;
-
- switch ( obj_type )
- {
- case H5G_DATASET:
-
- /* Open the dataset. */
- if ( (obj_id = H5Dopen( loc_id, obj_name )) < 0 )
- return -1;
- break;
-
- case H5G_GROUP:
-
- /* Open the group. */
- if ( (obj_id = H5Gopen( loc_id, obj_name )) < 0 )
- return -1;
- break;
+ switch(obj_type) {
+ case H5G_DATASET:
+ /* Open the dataset. */
+ if((obj_id = H5Dopen(loc_id, obj_name)) < 0)
+ return -1;
+ break;
- default:
- return -1;
- }
+ case H5G_GROUP:
+ /* Open the group. */
+ if((obj_id = H5Gopen2(loc_id, obj_name, H5P_DEFAULT)) < 0)
+ return -1;
+ break;
- return obj_id;
+ default:
+ return -1;
+ }
+ return obj_id;
}