From 7826df093583bb26762b065efb4454f78de0e26a Mon Sep 17 00:00:00 2001 From: "levitte@gmail.com" Date: Fri, 18 Sep 2009 12:04:23 +0000 Subject: [PATCH] Better to handle -h after the core is initialised git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@210 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- ykpersonalize.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ykpersonalize.c b/ykpersonalize.c index 46f9944..effd8d0 100644 --- a/ykpersonalize.c +++ b/ykpersonalize.c @@ -183,11 +183,6 @@ int main(int argc, char **argv) ykp_errno = 0; yk_errno = 0; - if (argc == 2 && strcmp (argv[1], "-h") == 0) { - fputs(usage, stderr); - goto err; - } - /* Assume the worst */ error = true; @@ -196,6 +191,11 @@ int main(int argc, char **argv) goto err; } + if (argc == 2 && strcmp (argv[1], "-h") == 0) { + fputs(usage, stderr); + goto err; + } + if (!(yk = yk_open_first_key())) { exit_code = 1; goto err; -- 2.39.5