Quantcast

skipLeadingSpace

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

skipLeadingSpace

joseph
is this correct ??

char *
skipLeadingSpace(char *aString)
{
    char *result = aString;

    while (xisspace(*aString))
        ++aString;

    return result;
}
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: skipLeadingSpace

Alex Rousskov
On 04/14/2017 03:30 PM, joseph wrote:

> is this correct ??
>
> char *
> skipLeadingSpace(char *aString)
> {
>     char *result = aString;
>
>     while (xisspace(*aString))
>         ++aString;
>
>     return result;
> }

No, the above code is incorrect. It does nothing [useful]. The bug was
introduced in r5698 "Client side refactoring - no functionality changes".

Fortunately, this bug has no effect in recent code because this buggy
function is unused. It should be removed.


Thank you,

Alex.
P.S. You should discuss Squid code on squid-dev not squid-users.

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Loading...