diff --git a/crypto/rand/rand_egd.c b/crypto/rand/rand_egd.c index 5fb230fa95d7888a7b24fdcc9901f9156ba4b5c3..f77af415c016f47022d3534bd698e113b0440f00 100644 --- a/crypto/rand/rand_egd.c +++ b/crypto/rand/rand_egd.c @@ -228,10 +228,10 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) int RAND_egd_bytes(const char *path, int bytes) { - int num, ret = 0; + int num, ret = -1; num = RAND_query_egd_bytes(path, NULL, bytes); - if (num < 1 || RAND_status() == 1) + if (RAND_status() == 1) ret = num; err: return (ret);