summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-05-24 12:49:24 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-05-24 12:49:24 (GMT)
commit65de8add1f47b0a8a0f1e5932ce0684fc2d529fd (patch)
treef562245eba0f7736ae89a1f5128672f8b63a3069 /tools/h5dump/h5dump.c
parentb08afe35a41fc89bfa2d4ad7d412b4c91a25dacf (diff)
downloadhdf5-65de8add1f47b0a8a0f1e5932ce0684fc2d529fd.zip
hdf5-65de8add1f47b0a8a0f1e5932ce0684fc2d529fd.tar.gz
hdf5-65de8add1f47b0a8a0f1e5932ce0684fc2d529fd.tar.bz2
[svn-r13805]
Early detection of no arguments, print usage and exit Tested: linux
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 8322cbc..069a522 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -3377,6 +3377,12 @@ parse_command_line(int argc, const char *argv[])
const char *outfname=NULL;
bin_form = -1;
+ /* no arguments */
+ if (argc == 1) {
+ usage(progname);
+ leave(EXIT_FAILURE);
+ }
+
/* this will be plenty big enough to hold the info */
hand = calloc((size_t)argc, sizeof(struct handler_t));