Skip to content

Commit

Permalink
Correctly check for arc4random_buf
Browse files Browse the repository at this point in the history
Apparently it's necssary to do an explicit comparison with NULL here.
This also gets rid of a compile warning
  • Loading branch information
shahn committed Jun 1, 2012
1 parent bff5f94 commit fcec3e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evutil_rand.c
Expand Up @@ -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
Expand Down

0 comments on commit fcec3e8

Please sign in to comment.