aboutsummaryrefslogtreecommitdiff
path: root/crypto/rand/randfile.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-01-22 12:57:29 -0500
committerRich Salz <rsalz@openssl.org>2015-01-22 12:57:29 -0500
commit27c7609cf8e72dfa2956bc00f166301ee983581a (patch)
tree300e053981fbd86cfb008e0606aa044bc275a2cd /crypto/rand/randfile.c
parent9c46f4b9cd4912b61cb546c48b678488d7f26ed6 (diff)
downloadopenssl-27c7609cf8e72dfa2956bc00f166301ee983581a.zip
openssl-27c7609cf8e72dfa2956bc00f166301ee983581a.tar.gz
openssl-27c7609cf8e72dfa2956bc00f166301ee983581a.tar.bz2
ifdef cleanup, 2 remove OPENSSL_NO_SETVBUF_IONBF
Use setbuf(fp, NULL) instead of setvbuf(). This removes some ifdef complexity because all of our platforms support setbuf. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/rand/randfile.c')
-rw-r--r--crypto/rand/randfile.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c
index bec7058..b234be0 100644
--- a/crypto/rand/randfile.c
+++ b/crypto/rand/randfile.c
@@ -160,9 +160,7 @@ int RAND_load_file(const char *file, long bytes)
* because we will waste system entropy.
*/
bytes = (bytes == -1) ? 2048 : bytes; /* ok, is 2048 enough? */
-# ifndef OPENSSL_NO_SETVBUF_IONBF
- setvbuf(in, NULL, _IONBF, 0); /* don't do buffered reads */
-# endif /* ndef OPENSSL_NO_SETVBUF_IONBF */
+ setbuf(stdin, NULL); /* don't do buffered reads */
}
#endif
for (;;) {