|
From: | Samuel Thibault |
Subject: | Re: [Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration |
Date: | Tue, 9 Feb 2016 21:31:15 +0100 |
User-agent: | Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Thomas Huth, on Tue 09 Feb 2016 17:14:15 +0100, wrote: > > + srand(time(NULL)); > > That srand should maybe be done in main() instead? (Otherwise every > subsystem might end up in repeating this all over the place) Eric Blake added: > >> +#define rand_a_b(a, b)\ > >> + (rand()%(int)(b-a)+a) > > Should we rely on glib for nicer random interval functions? Why not indeed. What do you prefer? A global GRand (as suggested above), or a GRand local to the Slirp? Samuel
[Prev in Thread] | Current Thread | [Next in Thread] |