summaryrefslogtreecommitdiff
path: root/tests/sys/opencrypto/poly1305_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sys/opencrypto/poly1305_test.c')
-rw-r--r--tests/sys/opencrypto/poly1305_test.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/sys/opencrypto/poly1305_test.c b/tests/sys/opencrypto/poly1305_test.c
index 64a1f09342638..3687d0c65ec00 100644
--- a/tests/sys/opencrypto/poly1305_test.c
+++ b/tests/sys/opencrypto/poly1305_test.c
@@ -302,17 +302,10 @@ parse_vector(const struct poly1305_kat *kat,
static int
get_handle_fd(void)
{
- int dc_fd, fd;
+ int fd;
- dc_fd = open("/dev/crypto", O_RDWR);
-
- /*
- * Why do we do this dance instead of just operating on /dev/crypto
- * directly? I have no idea.
- */
- ATF_REQUIRE(dc_fd >= 0);
- ATF_REQUIRE(ioctl(dc_fd, CRIOGET, &fd) != -1);
- close(dc_fd);
+ fd = open("/dev/crypto", O_RDWR);
+ ATF_REQUIRE(fd >= 0);
return (fd);
}