Re: [evolution-patches] Fix for the bug #64398 [calendar]




> >         priv->categories_by_id = g_hash_table_new_full (g_str_hash,
> > g_str_equal, g_free, g_free);
> >         priv->categories_by_name = g_hash_table_new_full (g_str_hash,
> > g_str_equal, g_free, g_free);
> > +       priv->timeout_id = 0;
> > 
> here, you probably want to set priv->timeout_id to -1, since 0 is a
> valid timeout_id IIRC

I don't think so, g_timeout_add returns guint and uses 0 in the error
case (ie g_return_val_if_fail).

JP's right. 0 is the 'unset' value.  If you're using -1 you could be asking for trouble.

--
Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]