diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-09-24 19:51:15 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-09-24 19:51:15 (GMT) |
commit | 81c43bd3ab7b53c184505666baba25ed242fefc1 (patch) | |
tree | f4288b8b69936cd6cc7af2a14e60ee63f20b392c | |
parent | a4d6a270783d69c663357c31fcd6196b98706dfb (diff) | |
download | hdf5-81c43bd3ab7b53c184505666baba25ed242fefc1.zip hdf5-81c43bd3ab7b53c184505666baba25ed242fefc1.tar.gz hdf5-81c43bd3ab7b53c184505666baba25ed242fefc1.tar.bz2 |
Fix missing option and incorrect close
-rw-r--r-- | tools/h5stat/h5stat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index e3e19d5..d6f5e5c 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -151,7 +151,7 @@ struct handler_t { char **obj; }; -static const char *s_opts ="Aa:Ddm:EFfhGgl:STO:Vw:"; +static const char *s_opts ="Aa:Ddm:EFfhGgl:STO:Vw:H:"; /* e.g. "filemetadata" has to precede "file"; "groupmetadata" has to precede "group" etc. */ static struct long_options l_opts[] = { {"help", no_arg, 'h'}, @@ -1810,7 +1810,8 @@ main(int argc, const char *argv[]) if(h5trav_visit(fid, hand->obj[u], TRUE, TRUE, obj_stats, lnk_stats, &iter) < 0) { error_msg("unable to traverse object \"%s\"\n", hand->obj[u]); h5tools_setstatus(EXIT_FAILURE); - } else + } + else print_statistics(hand->obj[u], &iter); } /* end for */ } /* end if */ @@ -1831,7 +1832,7 @@ done: iter_free(&iter); if (fapl_id != H5P_DEFAULT) { - if (0 < H5Pclose(fapl_id)) { + if (H5Pclose(fapl_id) < 0) { error_msg("unable to close fapl entry\n"); h5tools_setstatus(EXIT_FAILURE); } |