Re: [PATCH] Analysis of bug in BSD patch

From: Stefan Esser <se_at_freebsd.org>
Date: Thu, 23 May 2013 23:02:55 +0200
Am 23.05.2013 19:12, schrieb Xin Li:
>> The following patch fixes the behaviour and makes it compliant
>> with both the man page and GNU patch:
> 
>> Index: pch.c 
>> ===================================================================
>
>> 
> 
> --- pch.c	(revision 250926)
>> +++ pch.c	(working copy) _at__at_ -1537,10 +1537,16 _at__at_ continue; if
>> ((tmp = num_components(names[i].path)) > min_components)
>> continue; - min_components = tmp; +		if (tmp < min_components) {
>> + min_components = tmp; +			best = names[i].path; +		} if ((tmp
>> = strlen(basename(names[i].path))) > min_baselen) continue; - 
>> min_baselen = tmp; +		if (tmp < min_baselen) { +			min_baselen = 
>> tmp; +			best = names[i].path; +		} if ((tmp = 
>> strlen(names[i].path)) > min_len) continue; min_len = tmp;
> 
>> Please review this patch - I'd like to commit it to HEAD if there
>>  are no objections.
> 
> Sounds good to me, thanks for working on this!

Committed to HEAD as r250943. AFAIK, the BSD patch has been MFCed to 9,
but is not used by default. If there are no problems with this patch,
I plan to MFC it at the end of June, unless there are objections.

Regards, STefan
Received on Thu May 23 2013 - 19:03:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:38 UTC