summaryrefslogtreecommitdiffstats
path: root/tools/src/h5repack/h5repack_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/h5repack/h5repack_main.c')
-rw-r--r--tools/src/h5repack/h5repack_main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index c0c8a2a..16899a3 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -412,7 +412,7 @@ set_sort_order(const char *form)
static
int parse_command_line(int argc, const char **argv, pack_opt_t* options)
{
- int opt;
+ int bound, opt;
int ret_value = 0;
/* parse command line options */
@@ -492,19 +492,21 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
break;
case 'j':
- options->low_bound = (H5F_libver_t)HDatoi(opt_arg);
- if (options->low_bound < H5F_LIBVER_EARLIEST || options->low_bound > H5F_LIBVER_LATEST) {
+ bound = HDatoi(opt_arg);
+ if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) {
error_msg("in parsing low bound\n");
goto done;
}
+ options->low_bound = bound;
break;
case 'k':
- options->high_bound = (H5F_libver_t)HDatoi(opt_arg);
- if (options->high_bound < H5F_LIBVER_EARLIEST || options->high_bound > H5F_LIBVER_LATEST) {
+ bound = HDatoi(opt_arg);
+ if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) {
error_msg("in parsing high bound\n");
goto done;
}
+ options->high_bound = bound;
break;
case 'c':