From 452b34a770eb96fb5eb49eec49c5e69d65e7cbd8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulf=20M=C3=B6ller?= Date: Thu, 8 Feb 2001 17:50:55 +0000 Subject: [PATCH] add comment and RAND_load_file() change as in main branch. --- crypto/rand/randfile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 528e410f74..02f16aa810 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -83,6 +83,9 @@ /* #define RFILE ".rnd" - defined in ../../e_os.h */ +/* Note that these functions are intended for seed files only. + * Entropy devices and EGD sockets are handled in rand_unix.c */ + int RAND_load_file(const char *file, long bytes) { /* If bytes >= 0, read up to 'bytes' bytes. @@ -117,7 +120,7 @@ int RAND_load_file(const char *file, long bytes) if (bytes > 0) { bytes-=n; - if (bytes == 0) break; + if (bytes <= 0) break; } } fclose(in); -- 2.25.1