]> err.no Git - yubikey-personalization.old/commitdiff
Better to handle -h after the core is initialised
authorRichard Levitte <levitte@lp.se>
Fri, 18 Sep 2009 12:04:23 +0000 (12:04 +0000)
committerRichard Levitte <levitte@lp.se>
Fri, 18 Sep 2009 12:04:23 +0000 (12:04 +0000)
ykpersonalize.c

index 46f99443d80b8128323d22b16e7f23694a976864..effd8d08c6d7f7298db994db21e35fc69b492c25 100644 (file)
@@ -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;