projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
rand/randfile.c: rationalize __OpenBSD__ code path.
[openssl.git]
/
crypto
/
rand
/
randfile.c
diff --git
a/crypto/rand/randfile.c
b/crypto/rand/randfile.c
index 16cc27aa9b08f88dc90cac5334d02db8942278cc..dfec2c7d6b128cd9eddf555c0ffef4cd72870cf7 100644
(file)
--- a/
crypto/rand/randfile.c
+++ b/
crypto/rand/randfile.c
@@
-357,11
+357,7
@@
const char *RAND_file_name(char *buf, size_t size)
* available.
*/
- if (!buf[0])
- if (OPENSSL_strlcpy(buf, "/dev/arandom", size) >= size) {
- return NULL;
- }
- if (stat(buf, &sb) == -1)
+ if (!buf[0] || stat(buf, &sb) == -1)
if (OPENSSL_strlcpy(buf, "/dev/arandom", size) >= size) {
return NULL;
}