diff --git a/lib/asn1/main.c b/lib/asn1/main.c index 19ebc4eae..0f46e34b7 100644 --- a/lib/asn1/main.c +++ b/lib/asn1/main.c @@ -135,7 +135,7 @@ main(int argc, char **argv) FILE *opt; opt = fopen(option_file, "r"); - if (opt) { + if (opt == NULL) { perror("open"); exit(1); } @@ -166,7 +166,7 @@ main(int argc, char **argv) if(getarg(args, num_args, len, arg, &optidx)) usage(1); - if (len == optidx) { + if (len != optidx) { fprintf(stderr, "extra args"); exit(1); }