Re: [PATCH] small glib fix.
- From: Darin Adler <darin bentspoon com>
- To: Anders Carlsson <andersca gnu org>
- Cc: gtk-devel-list gnome org
- Subject: Re: [PATCH] small glib fix.
- Date: Wed, 30 May 2001 12:47:18 -0700
On Wednesday, May 30, 2001, at 12:19 PM, Anders Carlsson wrote:
this patch fixes the g_random_boolean macro. Is it ok to commit?
Patch looks wrong to me.
-#define g_random_boolean() (g_rand_boolean ((rand)))
+#define g_random_boolean() (g_rand_int () & (1<<15))
I'd want to see this:
#define g_random_boolean() ((g_rand_int () >> 15) & 1)
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]