Permalink
Browse files

opensc-explorer: fix argc checks in do_update_*()

do_update_binary() and do_update_record() expect a fixed number of parameters
each: adapt the checks for argc so that they do the right thing.

Signed-off-by: Peter Marschall <peter@adpm.de>
  • Loading branch information...
1 parent 081bf9f commit aa7a5ae5f832c03c510f241aa3a10770e0ad66d0 @marschap committed Jun 2, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/tools/opensc-explorer.c
@@ -1131,7 +1131,7 @@ static int do_update_binary(int argc, char **argv)
sc_file_t *file;
char *in_str;
- if (argc < 2 || argc > 3)
+ if (argc != 3)
return usage(do_update_binary);
if (arg_to_path(argv[0], &path, 0) != 0)
return usage(do_update_binary);
@@ -1182,7 +1182,7 @@ static int do_update_record(int argc, char **argv)
sc_file_t *file;
char *in_str;
- if (argc < 3 || argc > 4)
+ if (argc != 4)
return usage(do_update_record);
if (arg_to_path(argv[0], &path, 0) != 0)
return usage(do_update_record);

0 comments on commit aa7a5ae

Please sign in to comment.