From fcec3e80c43722954ee4f63150b5eb1a6343f06e Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Fri, 1 Jun 2012 05:23:29 +0200 Subject: [PATCH] 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(-) diff --git a/evutil_rand.c b/evutil_rand.c index e2bf605f3d..b66d88b47c 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