rots-util: return -1 for unknown options

master
S.J.R. van Schaik 7 years ago
parent 7ddade6065
commit 4ffea90a17
  1. 2
      source/sign.c
  2. 2
      source/verify.c

@ -48,7 +48,7 @@ static int parse_args(struct args *args, int argc, char *argv[])
case OPTION_DIGEST: args->digest = optarg; break; case OPTION_DIGEST: args->digest = optarg; break;
case OPTION_KEY: args->key = optarg; break; case OPTION_KEY: args->key = optarg; break;
case OPTION_CERT: args->cert = optarg; break; case OPTION_CERT: args->cert = optarg; break;
default: break; default: return -1;
} }
} }

@ -44,7 +44,7 @@ static int parse_args(struct args *args, int argc, char *argv[])
case OPTION_HELP: return -1; case OPTION_HELP: return -1;
case OPTION_IMAGE: args->image = optarg; break; case OPTION_IMAGE: args->image = optarg; break;
case OPTION_CERTS: args->certs = optarg; break; case OPTION_CERTS: args->certs = optarg; break;
default: break; default: return -1;
} }
} }

Loading…
Cancel
Save