Re: [PATCH] small glib fix.



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]