]> err.no Git - yubikey-personalization/commitdiff
test for error state from yk_init()
authorKlas Lindfors <klas@yubico.com>
Fri, 14 Sep 2012 07:23:20 +0000 (09:23 +0200)
committerKlas Lindfors <klas@yubico.com>
Fri, 14 Sep 2012 07:23:20 +0000 (09:23 +0200)
tests/test_threaded_calls.c

index 93e5e55fefa7c8f2424b4ae03c476d9149bfa21f..19403d38aa4a290937100776c857b2e93f53cd14 100644 (file)
 
 void *start_thread(void *arg)
 {
-       yk_init();
+       if(!yk_init()) {
+               printf("failed to init usb..\n");
+               return;
+       }
        YK_STATUS *st = ykds_alloc();
        YK_KEY *yk = 0;
        yk_errno = 0;