]> granicus.if.org Git - libevent/commitdiff
Fix an unused variable warning on *BSD.
authorNick Mathewson <nickm@torproject.org>
Thu, 2 Aug 2012 15:38:32 +0000 (11:38 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 2 Aug 2012 15:38:32 +0000 (11:38 -0400)
evutil_rand.c

index b66d88b47ca3858c7c4dae9be68ccd1dbeec1342..284e230e9e8672098cd6124fd98e002208c3e41d 100644 (file)
@@ -58,10 +58,10 @@ evutil_secure_rng_global_setup_locks_(const int enable_locks)
 static void
 ev_arc4random_buf(void *buf, size_t n)
 {
-       unsigned char *b = buf;
 #if defined(_EVENT_HAVE_ARC4RANDOM_BUF) && !defined(__APPLE__)
        return arc4random_buf(buf, n);
 #else
+       unsigned char *b = buf;
 
 #if defined(_EVENT_HAVE_ARC4RANDOM_BUF)
        /* OSX 10.7 introducd arc4random_buf, so if you build your program