summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRoberto Vargas <roberto.vargas@arm.com>2018-06-27 08:23:22 +0100
committerRoberto Vargas <roberto.vargas@arm.com>2018-06-27 08:25:20 +0100
commit600835d028a1303346a981eb6080a766806a6ae5 (patch)
tree9ff4a53c2d95c41eb6e4bc6625ed7d1aee75f0ef /tools
parentf790cc0a9c492cf3615c82574e2c3f1ff8af0a3d (diff)
make_cert: return error when invalid options are used
Print_help was used in different contexts and returning no error in that function was hiding the error when incorrect options were used. Change-Id: Ic3f71748be7ff8440c9d54810b986e9f177f4439 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/cert_create/src/main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/cert_create/src/main.c b/tools/cert_create/src/main.c
index 4abfe6dd..ed566207 100644
--- a/tools/cert_create/src/main.c
+++ b/tools/cert_create/src/main.c
@@ -140,8 +140,6 @@ static void print_help(const char *cmd, const struct option *long_opt)
i++;
}
printf("\n");
-
- exit(0);
}
static int get_key_alg(const char *key_alg_str)
@@ -334,7 +332,7 @@ int main(int argc, char *argv[])
break;
case 'h':
print_help(argv[0], cmd_opt);
- break;
+ exit(0);
case 'k':
save_keys = 1;
break;