summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/engine/hw_cryptodev.c2
-rw-r--r--src/lib/libssl/src/crypto/engine/hw_cryptodev.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c
index b8217cdea1..f2d43d55e5 100644
--- a/src/lib/libcrypto/engine/hw_cryptodev.c
+++ b/src/lib/libcrypto/engine/hw_cryptodev.c
@@ -117,7 +117,7 @@ open_dev_crypto()
117 static int fd = -1; 117 static int fd = -1;
118 118
119 if (fd == -1) { 119 if (fd == -1) {
120 if (fd = open("/dev/crypto", O_RDWR, 0) == -1) 120 if ((fd = open("/dev/crypto", O_RDWR, 0)) == -1)
121 return (-1); 121 return (-1);
122 /* close on exec */ 122 /* close on exec */
123 if (fcntl(fd, F_SETFD, 1) == -1) { 123 if (fcntl(fd, F_SETFD, 1) == -1) {
diff --git a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
index b8217cdea1..f2d43d55e5 100644
--- a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
+++ b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
@@ -117,7 +117,7 @@ open_dev_crypto()
117 static int fd = -1; 117 static int fd = -1;
118 118
119 if (fd == -1) { 119 if (fd == -1) {
120 if (fd = open("/dev/crypto", O_RDWR, 0) == -1) 120 if ((fd = open("/dev/crypto", O_RDWR, 0)) == -1)
121 return (-1); 121 return (-1);
122 /* close on exec */ 122 /* close on exec */
123 if (fcntl(fd, F_SETFD, 1) == -1) { 123 if (fcntl(fd, F_SETFD, 1) == -1) {