summaryrefslogtreecommitdiff
path: root/poll.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-04-09 11:30:46 -0400
committerNick Mathewson <nickm@torproject.org>2012-04-09 11:30:46 -0400
commit3aa44159c53af1d6459a85dc1841c7c494d52464 (patch)
treebf545d67d57ab47bb0f262a3a9e78394c64162c0 /poll.c
parente86af4b7e56ed5b7050cb4f41ae534f54748598c (diff)
downloadlibevent-3aa44159c53af1d6459a85dc1841c7c494d52464.tar.gz
Tweak the new evutil_weakrand_() code
Make its state actually get seeded. Document it more thoroughly. Turn its state into a structure. Fix a bug in evutil_weakrand_range_() where it could return the top of the range. Change its return type to ev_int32_t. Add a quick unit test to make sure that the value of evutil_weakrand_range_() is in range.
Diffstat (limited to 'poll.c')
-rw-r--r--poll.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/poll.c b/poll.c
index 3ac427ac..01144854 100644
--- a/poll.c
+++ b/poll.c
@@ -93,6 +93,8 @@ poll_init(struct event_base *base)
evsig_init_(base);
+ evutil_weakrand_seed_(&base->weakrand_seed, 0);
+
return (pollop);
}