summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 2921fb9..34b8bc4 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -932,7 +932,7 @@ parse_mask_list(const char *h_list)
static void
free_handler(struct handler_t *hand, int len)
{
- register int i;
+ int i;
if(hand) {
for (i = 0; i < len; i++) {
@@ -997,7 +997,7 @@ parse_command_line(int argc, const char *argv[])
/* this will be plenty big enough to hold the info */
if((hand = (struct handler_t *)HDcalloc((size_t)argc, sizeof(struct handler_t)))==NULL) {
- goto error;
+ goto error;
}
/* parse command line options */
@@ -1054,7 +1054,7 @@ parse_start:
break;
case 'w':
h5tools_nCols = HDatoi(opt_arg);
- if (h5tools_nCols==0) {
+ if (h5tools_nCols <= 0) {
h5tools_nCols = 65535;
}
last_was_dset = FALSE;
@@ -1293,7 +1293,7 @@ parse_start:
if (s->count.data) {
HDfree(s->count.data);
s->count.data = NULL;
- }
+ }
parse_hsize_list(opt_arg, &s->count);
break;
case 'k':
@@ -1356,6 +1356,7 @@ error:
return hand;
}
+
/*-------------------------------------------------------------------------
* Function: main
@@ -1423,6 +1424,7 @@ main(int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
+
/* Disable tools error reporting */
H5Eget_auto2(H5tools_ERR_STACK_g, &tools_func, &tools_edata);
H5Eset_auto2(H5tools_ERR_STACK_g, NULL, NULL);
@@ -1449,28 +1451,28 @@ main(int argc, const char *argv[])
"to display selected objects");
h5tools_setstatus(EXIT_FAILURE);
goto done;
- }
+ }
else if (display_bb) {
error_msg("option \"%s\" not available for XML\n", "--boot-block");
h5tools_setstatus(EXIT_FAILURE);
goto done;
- }
+ }
else if (display_oid == 1) {
error_msg("option \"%s\" not available for XML\n", "--object-ids");
h5tools_setstatus(EXIT_FAILURE);
goto done;
- }
+ }
else if (display_char == TRUE) {
error_msg("option \"%s\" not available for XML\n", "--string");
h5tools_setstatus(EXIT_FAILURE);
goto done;
- }
+ }
else if (usingdasho) {
error_msg("option \"%s\" not available for XML\n", "--output");
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
- }
+ }
else {
if (xml_dtd_uri) {
warn_msg("option \"%s\" only applies with XML: %s\n", "--xml-dtd", xml_dtd_uri);