Cliff Woolley wrote:

>On 29 Mar 2002 [EMAIL PROTECTED] wrote:
>
>>  -        while (*path && *(path+1) != '/')
>>  +        while (*path && (*path != '/')) {
>>  +            ++path;
>>  +        }
>>  +        if (*path == '/') {
>>               ++path;
>>  +        }
>>
>
>Alternatively:
>
>while (*path && *(path++) != '/')
>    continue;
>

Ah, that's much better.  I'll switch to this single-loop
form (plus a comment to explain what it's doing, because
the subtlety of the original version's postincrement logic
led to bugs in both the original code and the first attempt
at a fix).

--Brian



Reply via email to