Correctly check for arc4random_buf

Apparently it's necssary to do an explicit comparison with NULL here.
This also gets rid of a compile warning
This commit is contained in:
Sebastian Hahn 2012-06-01 05:23:29 +02:00
parent bff5f94073
commit fcec3e80c4

View File

@ -70,7 +70,7 @@ ev_arc4random_buf(void *buf, size_t n)
* and fall back otherwise. (OSX does this using some linker
* trickery.)
*/
if (arc4random_buf) {
if (arc4random_buf != NULL) {
return arc4random_buf(buf, n);
}
#endif