Daniel Rall wrote:
> On Tue, 15 May 2007, Kamesh Jayachandran wrote:
>
>
>>>> ctx, pool));
>>>> @@ -241,7 +242,7 @@
>>>> {
>>>> const char *path;
>>>> apr_hash_this(hi, (void *) &path, NULL, NULL);
>>>> - if (strcmp(path, copyfrom_path) != 0)
>>>> + if (copyfrom_path && strcmp(path, copyfrom_path) != 0)
>>>>
>>>>
>>> Shouldn't this be?:
>>>
>>> if (copyfrom_path == NULL || strcmp(path, copyfrom_path) != 0)
>>>
>>>
>> No. It segfaults in strcmp when copyfrom_path is NULL.
>>
>
> Right -- and the additional check avoids the strcmp() in the case
> where copyfrom_path is NULL. However, the strcmp() is only there to
> weed out the case where copyfrom_path exists as a merge source. If we
> have no copyfrom_path, we can avoid the string equality check
> entirely.
>
> +1 to commit with this tweak.
>
Thanks Committed in r25024.
With regards
Kamesh Jayachandran
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 15 20:06:42 2007