From fcec3e80c43722954ee4f63150b5eb1a6343f06e Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Fri, 1 Jun 2012 05:23:29 +0200 Subject: 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 --- evutil_rand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'evutil_rand.c') diff --git a/evutil_rand.c b/evutil_rand.c index e2bf605f..b66d88b4 100644 --- a/evutil_rand.c +++ b/evutil_rand.c @@ -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 -- cgit v1.2.1