* the number of bytes requested or smaller, if the EGD pool is
* drained and the daemon signals that the pool is empty.
*
- * RAND_egd(path) will query 255 bytes and use the bytes retreived to seed
+ * RAND_egd(path) will query 255 bytes and use the bytes retrieved to seed
* the PRNG.
* RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.
*/
break;
# endif
default:
+ ret = -1;
goto err; /* failure */
}
}
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)
+ if (num < 0)
goto err;
if (RAND_status() == 1)
ret = num;