We should return after arc4random_buf()

This commit is contained in:
Makoto Kato 2013-07-10 11:02:43 +09:00
parent 838161dc01
commit 1ea1f26b41

View File

@ -67,6 +67,7 @@ ev_arc4random_buf(void *buf, size_t n)
{
#if defined(EVENT__HAVE_ARC4RANDOM_BUF) && !defined(__APPLE__)
arc4random_buf(buf, n);
return;
#else
unsigned char *b = buf;
@ -79,6 +80,7 @@ ev_arc4random_buf(void *buf, size_t n)
*/
if (arc4random_buf != NULL) {
arc4random_buf(buf, n);
return;
}
#endif
/* Make sure that we start out with b at a 4-byte alignment; plenty