Re: [Evolution-hackers] [evolution-patches] Avoiding a strdup in camel-folder-summar.c

2006-07-20 Thread Chris Toshok
On Wed, 2006-07-12 at 02:28 +0530, Ritesh Khadgaray wrote: > > out of curiosity, the first patch reads through the list > and this patch, return if any one of the token is equal, anf not any > following it. > > Would the below not be better ? > > for (i = 0; i < tokens_len; i ++) >

Re: [Evolution-hackers] [evolution-patches] Avoiding a strdup in camel-folder-summar.c

2006-07-12 Thread Philip Van Hoof
On Tue, 2006-07-11 at 09:28 -0400, Chris Toshok wrote: > static void > free_token (gchar *token) > { > gint i; > > for (i = 0; i < tokens_len; i ++) > if (tokens[i] == token) > return; > > g_free (token); > } ps. Maybe for real efficiency yo

Re: [Evolution-hackers] [evolution-patches] Avoiding a strdup in camel-folder-summar.c

2006-07-12 Thread Ritesh Khadgaray
On Tue, 2006-07-11 at 17:06 -0400, Chris Toshok wrote: > On Wed, 2006-07-12 at 02:28 +0530, Ritesh Khadgaray wrote: > > > > out of curiosity, the first patch reads through the list > > and this patch, return if any one of the token is equal, anf not any > > following it. > > > > Would the below n

Re: [Evolution-hackers] [evolution-patches] Avoiding a strdup in camel-folder-summar.c

2006-07-12 Thread Jeffrey Stedfast
On Wed, 2006-07-12 at 02:27 +0530, Ritesh Khadgaray wrote: > On Tue, 2006-07-11 at 09:28 -0400, Chris Toshok wrote: > > No opinion on the rest of the patch, but this: > > > > > +static void > > > +free_token (gchar *token) > > > +{ > > > + gint i=0; > > > + gboolean no=FALSE; > > > + >

Re: [Evolution-hackers] [evolution-patches] Avoiding a strdup in camel-folder-summar.c

2006-07-12 Thread Ritesh Khadgaray
On Tue, 2006-07-11 at 09:28 -0400, Chris Toshok wrote: > No opinion on the rest of the patch, but this: > > > +static void > > +free_token (gchar *token) > > +{ > > + gint i=0; > > + gboolean no=FALSE; > > + > > + for (i=0; (i < tokens_len); i++) > > + { > > +

Re: [Evolution-hackers] [evolution-patches] Avoiding a strdup in camel-folder-summar.c

2006-07-11 Thread Philip Van Hoof
On Tue, 2006-07-11 at 09:28 -0400, Chris Toshok wrote: > No opinion on the rest of the patch, but this: > static void > free_token (gchar *token) > { > gint i; > > for (i = 0; i < tokens_len; i ++) > if (tokens[i] == token) > return; > > g_fr

Re: [Evolution-hackers] [evolution-patches] Avoiding a strdup in camel-folder-summar.c

2006-07-11 Thread Chris Toshok
No opinion on the rest of the patch, but this: > +static void > +free_token (gchar *token) > +{ > + gint i=0; > + gboolean no=FALSE; > + > + for (i=0; (i < tokens_len); i++) > + { > + if (tokens[i] == token) > + no = TRUE; > + } > +