summaryrefslogtreecommitdiffstats
path: root/examples/pk.c
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-25 00:35:48 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-25 00:40:52 +0200
commit5ec167e240a8002bba3cc37e22553c888c7d4133 (patch)
tree230abd9334eb0c156297a1f2467902ee2b606613 /examples/pk.c
parentd9c91873ac6dee10aeb7e165dee3aefc5f79bba8 (diff)
downloadcryptodev-linux-5ec167e240a8002bba3cc37e22553c888c7d4133.tar.gz
cryptodev-linux-5ec167e240a8002bba3cc37e22553c888c7d4133.tar.xz
cryptodev-linux-5ec167e240a8002bba3cc37e22553c888c7d4133.zip
Fix wrapping test conversions
Diffstat (limited to 'examples/pk.c')
-rw-r--r--examples/pk.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/pk.c b/examples/pk.c
index 1ad5873..6acbadf 100644
--- a/examples/pk.c
+++ b/examples/pk.c
@@ -650,13 +650,15 @@ test_ncr_wrap_key3(int cfd)
fflush(stdout);
/* convert it to key */
- if (ioctl(cfd, NCRIO_KEY_INIT, &privkey)) {
+ privkey = ioctl(cfd, NCRIO_KEY_INIT);
+ if (privkey == -1) {
fprintf(stderr, "Error: %s:%d\n", __func__, __LINE__);
perror("ioctl(NCRIO_KEY_INIT)");
return 1;
}
- if (ioctl(cfd, NCRIO_KEY_INIT, &pubkey)) {
+ pubkey = ioctl(cfd, NCRIO_KEY_INIT);
+ if (pubkey == -1) {
fprintf(stderr, "Error: %s:%d\n", __func__, __LINE__);
perror("ioctl(NCRIO_KEY_INIT)");
return 1;
@@ -669,7 +671,8 @@ test_ncr_wrap_key3(int cfd)
}
/* make a wrapping key */
- if (ioctl(cfd, NCRIO_KEY_INIT, &key)) {
+ key = ioctl(cfd, NCRIO_KEY_INIT);
+ if (key == -1) {
perror("ioctl(NCRIO_KEY_INIT)");
return 1;
}