On 04/22/2010 12:25 PM, Jakub Hrozek wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 04/22/2010 02:43 PM, Stephen Gallagher wrote: >> Nack. >> >> While this is clearly not a case where random values need to be highly >> random, on some implementations rand() is not uniformly distributed in >> the low-order bits. In order to be more portable, we should use >> >> selected = (int)((total + 1) * (rand()/(RAND_MAX + 1.0))) > > Thanks for the suggestion, a new patch is attached, also fixes a > whitespace issue.
I thought I'd already acked this... Ack. -- Stephen Gallagher RHCE 804006346421761 Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/sssd-devel