mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
We should return after arc4random_buf()
This commit is contained in:
parent
838161dc01
commit
1ea1f26b41
@ -67,6 +67,7 @@ ev_arc4random_buf(void *buf, size_t n)
|
|||||||
{
|
{
|
||||||
#if defined(EVENT__HAVE_ARC4RANDOM_BUF) && !defined(__APPLE__)
|
#if defined(EVENT__HAVE_ARC4RANDOM_BUF) && !defined(__APPLE__)
|
||||||
arc4random_buf(buf, n);
|
arc4random_buf(buf, n);
|
||||||
|
return;
|
||||||
#else
|
#else
|
||||||
unsigned char *b = buf;
|
unsigned char *b = buf;
|
||||||
|
|
||||||
@ -79,6 +80,7 @@ ev_arc4random_buf(void *buf, size_t n)
|
|||||||
*/
|
*/
|
||||||
if (arc4random_buf != NULL) {
|
if (arc4random_buf != NULL) {
|
||||||
arc4random_buf(buf, n);
|
arc4random_buf(buf, n);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Make sure that we start out with b at a 4-byte alignment; plenty
|
/* Make sure that we start out with b at a 4-byte alignment; plenty
|
||||||
|
Loading…
x
Reference in New Issue
Block a user