summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/h5dump.c22
-rw-r--r--tools/lib/h5tools_utils.c6
2 files changed, 15 insertions, 13 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index cfeaaef..fcb7bd3 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -6193,7 +6193,7 @@ xml_dump_group(hid_t gid, const char *name)
if(HDstrcmp(name, "/") == 0) {
isRoot = 1;
tmp = HDstrdup("/");
- }
+ }
else {
tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
HDstrcpy(tmp, prefix);
@@ -6213,7 +6213,7 @@ xml_dump_group(hid_t gid, const char *name)
H5Oget_info(gid, &oinfo);
if(oinfo.rc > 1) {
- obj_t *found_obj; /* Found object */
+ obj_t *found_obj; /* Found object */
/* Group with more than one link to it... */
found_obj = search_obj(group_table, oinfo.addr);
@@ -6222,7 +6222,7 @@ xml_dump_group(hid_t gid, const char *name)
indentation(indent);
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
h5tools_setstatus(EXIT_FAILURE);
- }
+ }
else {
char *t_name = xml_escape_the_name(name);
char *grpxid = (char *)malloc(100);
@@ -6237,7 +6237,7 @@ xml_dump_group(hid_t gid, const char *name)
xml_name_to_XID("/", grpxid, 100, 1);
HDfprintf(stdout, "<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n",
xmlnsprefix, grpxid, "/");
- }
+ }
else {
t_objname = xml_escape_the_name(found_obj->objname);
par_name = xml_escape_the_name(par);
@@ -6263,7 +6263,7 @@ xml_dump_group(hid_t gid, const char *name)
free(par_name);
}
free(ptrstr);
- }
+ }
else {
/* first time this group has been seen -- describe it */
@@ -6271,7 +6271,7 @@ xml_dump_group(hid_t gid, const char *name)
xml_name_to_XID("/", grpxid, 100, 1);
HDfprintf(stdout, "<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n",
xmlnsprefix, grpxid, "/");
- }
+ }
else {
char *t_tmp = xml_escape_the_name(tmp);
@@ -6319,7 +6319,7 @@ xml_dump_group(hid_t gid, const char *name)
/* iterate through all the links */
- if( (sort_by == H5_INDEX_CRT_ORDER) && (crt_order_flags & H5P_CRT_ORDER_TRACKED))
+ if((sort_by == H5_INDEX_CRT_ORDER) && (crt_order_flags & H5P_CRT_ORDER_TRACKED))
H5Literate(gid, sort_by, sort_order, NULL, dump_all_cb, NULL);
else
H5Literate(gid, H5_INDEX_NAME, sort_order, NULL, dump_all_cb, NULL);
@@ -6330,7 +6330,7 @@ xml_dump_group(hid_t gid, const char *name)
free(grpxid);
free(parentxid);
}
- }
+ }
else {
/* only link -- must be first time! */
@@ -6341,7 +6341,7 @@ xml_dump_group(hid_t gid, const char *name)
if(isRoot) {
xml_name_to_XID("/", grpxid, 100, 1);
HDfprintf(stdout, "<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n", xmlnsprefix, grpxid, "/");
- }
+ }
else {
char *t_tmp = xml_escape_the_name(tmp);
@@ -6403,11 +6403,11 @@ xml_dump_group(hid_t gid, const char *name)
if(isRoot)
HDfprintf(stdout, "</%sRootGroup>\n", xmlnsprefix);
else
- HDfprintf(stdout, "</%sGroup>\n" , xmlnsprefix);
+ HDfprintf(stdout, "</%sGroup>\n", xmlnsprefix);
if(par)
free(par);
if(tmp)
- free(tmp);
+ free(tmp);
}
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index b1df66e..ee6d5d2 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -785,10 +785,12 @@ H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_
* follow object in other file
*/
if(link_info->linfo.type == H5L_TYPE_EXTERNAL) {
- fapl = H5Pcreate(H5P_FILE_ACCESS);
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ goto out;
if(H5Pset_fapl_sec2(fapl) < 0)
goto out;
- lapl = H5Pcreate(H5P_LINK_ACCESS);
+ if((lapl = H5Pcreate(H5P_LINK_ACCESS)) < 0)
+ goto out;
if(H5Pset_elink_fapl(lapl, fapl) < 0)
goto out;
} /* end if */