Re: [evolution-patches] [evolution-data-server] Fix for bug #331633



On Mon, 2006-02-20 at 02:40 -0700, Veerapuram Varadhan wrote:
> On Sat, 2006-02-18 at 04:48 +0000, Irene Huang  wrote:
> > +       if (strlen(dn_value->str))
> > +               dn = g_strndup (dn_value->str, strlen(dn_value->str) -
> > 1);
> 
> Wouldn't it be better to store strlen() in a variable, instead of
> calling strlen twice?

another idea is simply doing:

if (dn_value->str[0])

no need to strlen it.

> 
> Thanks,
> 
> V. Varadhan
> _______________________________________________
> Evolution-patches mailing list
> Evolution-patches gnome org
> http://mail.gnome.org/mailman/listinfo/evolution-patches
> 
-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj ximian com  - www.novell.com




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