diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2013-08-22 20:44:25 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2013-08-22 20:44:25 (GMT) |
commit | 1220779c318ab305b956833131e5be9027f07cfe (patch) | |
tree | 5a49a2ac01fca56f1e0f9fb998c3aa8fbc703466 /tools/h5stat/h5stat.c | |
parent | 4df44aafaf8572814e705d0f259da2c0d081aae4 (diff) | |
download | hdf5-1220779c318ab305b956833131e5be9027f07cfe.zip hdf5-1220779c318ab305b956833131e5be9027f07cfe.tar.gz hdf5-1220779c318ab305b956833131e5be9027f07cfe.tar.bz2 |
[svn-r24060] Bring revisions #24002 - 24029 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'tools/h5stat/h5stat.c')
-rw-r--r-- | tools/h5stat/h5stat.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index 6fc1dc4..a5d7eef 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -915,11 +915,14 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) break; case 'l': - sgroups_threshold = HDatoi(opt_arg); - if(sgroups_threshold < 1) { - error_msg("Invalid threshold for small groups\n"); - goto error; - } /* end if */ + if(opt_arg) { + sgroups_threshold = HDatoi(opt_arg); + if(sgroups_threshold < 1) { + error_msg("Invalid threshold for small groups\n"); + goto error; + } + } else + error_msg("Missing threshold for small groups\n"); break; @@ -934,11 +937,14 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) break; case 'm': - sdsets_threshold = HDatoi(opt_arg); - if(sdsets_threshold < 1) { - error_msg("Invalid threshold for small datasets\n"); - goto error; - } /* end if */ + if(opt_arg) { + sdsets_threshold = HDatoi(opt_arg); + if(sdsets_threshold < 1) { + error_msg("Invalid threshold for small datasets\n"); + goto error; + } + } else + error_msg("Missing threshold for small datasets\n"); break; @@ -953,11 +959,14 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) break; case 'a': - sattrs_threshold = HDatoi(opt_arg); - if(sattrs_threshold < 1) { - error_msg("Invalid threshold for small # of attributes\n"); - goto error; - } /* end if */ + if(opt_arg) { + sattrs_threshold = HDatoi(opt_arg); + if(sattrs_threshold < 1) { + error_msg("Invalid threshold for small # of attributes\n"); + goto error; + } + } else + error_msg("Missing threshold for small # of attributes\n"); break; |