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

Jeffrey Stedfast <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Organization Novell, Inc.
Message-ID <[email protected]>
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
> [email protected]
> http://mail.gnome.org/mailman/listinfo/evolution-patches
> 
-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
[email protected]  - www.novell.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.