]> err.no Git - yubikey-personalization.old/commitdiff
Correct various typos
authorRichard Levitte <levitte@lp.se>
Tue, 25 Aug 2009 10:13:56 +0000 (10:13 +0000)
committerRichard Levitte <levitte@lp.se>
Tue, 25 Aug 2009 10:13:56 +0000 (10:13 +0000)
ykpersonalize.c

index 9bd81dd4a6f2357f7227a7e5003ed0a60f728221..e46358e914280f51b9e96790bddf11b724fdaa47 100644 (file)
@@ -176,17 +176,17 @@ main(int argc, char **argv)
        else
                printf("Unconfigured\n");
 
-       if (ykp_configure_for(cfg, 1, st))
+       if (!ykp_configure_for(cfg, 1, st))
                goto err;
 
        while((c = getopt(argc, argv, optstring)) != -1) {
                switch (c) {
                case '1':
-                       if (ykp_configure_for(cfg, 1, st))
+                       if (!ykp_configure_for(cfg, 1, st))
                                goto err;
                        break;
                case '2':
-                       if (ykp_configure_for(cfg, 2, st))
+                       if (!ykp_configure_for(cfg, 2, st))
                                goto err;
                        break;
                case 'i':
@@ -399,7 +399,7 @@ main(int argc, char **argv)
                fgets(passphrasebuf, sizeof(passphrasebuf), stdin);
                passphraselen = strlen(passphrasebuf);
                if (passphrasebuf[passphraselen - 1] == '\n')
-                       passphrasebuf[passphraselen - 1] == '\0';
+                       passphrasebuf[passphraselen - 1] = '\0';
                if (!ykp_AES_key_from_passphrase(cfg,
                                                 passphrasebuf, salt))
                        goto err;
@@ -422,7 +422,7 @@ main(int argc, char **argv)
                }
                commitlen = strlen(commitbuf);
                if (commitbuf[commitlen - 1] == '\n')
-                       commitbuf[commitlen - 1] == '\0';
+                       commitbuf[commitlen - 1] = '\0';
                if (strcmp(commitbuf, "y") == 0
                    || strcmp(commitbuf, "yes") == 0) {
                        exit_code = 2;