[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1382204 - /subversion/trunk/subversion/libsvn_subr/utf_validate.c

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Sat, 8 Sep 2012 10:34:22 +0200

On Sat, Sep 8, 2012 at 3:59 AM, Peter Samuelson <peter_at_p12n.org> wrote:

>
> > for (; len > 0; ++data, --len)
> > - if (*data < 0)
> > - return data;
> > + if (*data < 0 || *data >= 0x80)
> > + return data;
>
> A reasonable compiler will collapse it anyway, but this is shorter and
> more direct:
>
> if (*data & 0x80)
>

You are right. I'm just using the same pattern
as for the "<=" variant.

-- Stefan^2.

-- 
*
Join us this October at Subversion Live
2012<http://www.wandisco.com/svn-live-2012>
 for two days of best practice SVN training, networking, live demos,
committer meet and greet, and more! Space is limited, so get signed up
today<http://www.wandisco.com/svn-live-2012>
!
*
Received on 2012-09-08 10:35:02 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.