Re: [Q] Cleaning string whitespace trimming. Does it make any sense?

Dan Carpenter
2012-06-13T18:37:38Z

On Wed, Jun 13, 2012 at 03:30:57PM -0300, Ezequiel Garcia wrote:
> On Wed, Jun 13, 2012 at 3:21 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> > It returns a pointer to the first non whitespace character, but you
> > can just ignore the return value.  Normally the first character is
> > going to be non whitespace, so it's not even a slow down.
> >
>
> Got it. I guess when you say there is no performance impact,
> it's because this kind of functionality is used very sparsely in the code.
> (Please correct me if I'm wrong.)

If the first character is non-white space then it's just one extra
branch statement. And yeah, this tends to not be fast path code is
my guess.

regards,
dan carpenter