diff options
author | Christian Hesse <mail@eworm.de> | 2016-05-04 13:52:59 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2016-05-04 13:52:59 +0200 |
commit | f1d3e2f2170c9bd7fbfe215e586ecd1fd580904a (patch) | |
tree | 92eff8c8a55210934c015f6eb6dc6e8ba4312c5d /udev | |
parent | 2078941b3737d7a1d8b2d84a9771c18d33aa2925 (diff) | |
download | mkinitcpio-ykfde-f1d3e2f2170c9bd7fbfe215e586ecd1fd580904a.tar.gz mkinitcpio-ykfde-f1d3e2f2170c9bd7fbfe215e586ecd1fd580904a.tar.zst |
fix error condition for yk_init()
Diffstat (limited to 'udev')
-rw-r--r-- | udev/ykfde.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/udev/ykfde.c b/udev/ykfde.c index 3d303e6..246425f 100644 --- a/udev/ykfde.c +++ b/udev/ykfde.c @@ -231,14 +231,15 @@ int main(int argc, char **argv) { memset(challenge, 0, CHALLENGELEN + 1); /* init and open first Yubikey */ - if ((rc = yk_init()) < 0) { + if (yk_init() == 0) { perror("yk_init() failed"); + rc = EXIT_FAILURE; goto out10; } if ((yk = yk_open_first_key()) == NULL) { - rc = EXIT_FAILURE; perror("yk_open_first_key() failed"); + rc = EXIT_FAILURE; goto out20; } |