diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/h5tools_dump.c | 15 | ||||
-rw-r--r-- | tools/src/h5dump/h5dump_ddl.c | 8 | ||||
-rw-r--r-- | tools/src/h5ls/h5ls.c | 7 |
3 files changed, 6 insertions, 24 deletions
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index cd7c3d2..b59ae93 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3283,8 +3283,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, } else { haddr_t ioffset; - void *obj = NULL; - hid_t connector_id = H5I_INVALID_HID; hbool_t supported = FALSE; /* NORMAL FILE */ @@ -3304,10 +3302,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, /* Only dump the offset if the VOL connector implements * the functionality. */ - obj = H5VLobject(dset_id); - connector_id = H5VLget_connector_id(dset_id); - H5VLintrospect_opt_query(obj, connector_id, H5VL_SUBCLS_DATASET, H5VL_NATIVE_DATASET_GET_OFFSET, &supported); - H5VLclose(connector_id); + H5VLquery_optional(dset_id, H5VL_SUBCLS_DATASET, H5VL_NATIVE_DATASET_GET_OFFSET, &supported); if (supported) { @@ -3732,15 +3727,11 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_ * instead of the current stripmine position i; this is necessary * to print the array indices */ - void *obj = NULL; - hid_t connector_id = H5I_INVALID_HID; hbool_t supported = FALSE; /* Check if comments are supported and return if not */ - obj = H5VLobject(obj_id); - connector_id = H5VLget_connector_id(obj_id); - H5VLintrospect_opt_query(obj, connector_id, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_GET_COMMENT, &supported); - H5VLclose(connector_id); + H5VLquery_optional(obj_id, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_GET_COMMENT, &supported); + if (!supported) return; diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index e97ab7e..1df205c 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/h5dump/h5dump_ddl.c @@ -1136,8 +1136,6 @@ dump_fcpl(hid_t fid) unsigned sym_ik; /* symbol table B-tree internal 'K' value */ unsigned istore_ik; /* indexed storage B-tree internal 'K' value */ - void *obj = NULL; - hid_t connector_id = H5I_INVALID_HID; hbool_t supported = FALSE; /* Dumping the information here only makes sense for the native @@ -1145,10 +1143,8 @@ dump_fcpl(hid_t fid) * use that as a proxy for "native-ness". If that isn't supported, we'll * just return. */ - obj = H5VLobject(fid); - connector_id = H5VLget_connector_id(fid); - H5VLintrospect_opt_query(obj, connector_id, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_GET_INFO, &supported); - H5VLclose(connector_id); + H5VLquery_optional(fid, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_GET_INFO, &supported); + if (!supported) return; diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index f82827c..49f3bbf 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -2364,8 +2364,6 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi char* comment = NULL; char* obj_tok_str = NULL; ssize_t cmt_bufsize = -1; - void *obj = NULL; - hid_t connector_id = H5I_INVALID_HID; hbool_t supported = FALSE; /* Display attributes */ @@ -2401,10 +2399,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi } /* end if */ /* Only emit comments if the VOL connector supports that */ - obj = H5VLobject(obj_id); - connector_id = H5VLget_connector_id(obj_id); - H5VLintrospect_opt_query(obj, connector_id, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_GET_COMMENT, &supported); - H5VLclose(connector_id); + H5VLquery_optional(obj_id, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_GET_COMMENT, &supported); if (supported) { |