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':
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;
}
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;