summaryrefslogtreecommitdiff
path: root/evutil_rand.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2012-06-01 05:23:29 +0200
committerSebastian Hahn <sebastian@torproject.org>2012-06-01 05:23:29 +0200
commitfcec3e80c43722954ee4f63150b5eb1a6343f06e (patch)
tree8e0eca660c95b9facdd8fc986c38cf20fb5008d6 /evutil_rand.c
parentbff5f9407341030c77a29fc1c398083ccdb4e277 (diff)
downloadlibevent-fcec3e80c43722954ee4f63150b5eb1a6343f06e.tar.gz
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
Diffstat (limited to 'evutil_rand.c')
-rw-r--r--evutil_rand.c2
1 files changed, 1 insertions, 1 deletions
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