提交 85628011 编写于 作者: B Bodo Möller

error codes are longs, not ints

上级 5d809414
...@@ -482,12 +482,12 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) ...@@ -482,12 +482,12 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
unpredictable */ unpredictable */
static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num) static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
{ {
int ret, err; int ret;
ret = RAND_bytes(buf, num); ret = RAND_bytes(buf, num);
if (ret == 0) if (ret == 0)
{ {
err = ERR_peek_error(); long err = ERR_peek_error();
if (ERR_GET_LIB(err) == ERR_LIB_RAND && if (ERR_GET_LIB(err) == ERR_LIB_RAND &&
ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED) ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED)
(void)ERR_get_error(); (void)ERR_get_error();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册