Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 May 2013 23:02:55 +0200
From:      Stefan Esser <se@freebsd.org>
To:        d@delphij.net
Subject:   Re: [PATCH] Analysis of bug in BSD patch
Message-ID:  <519E83FF.6020107@freebsd.org>
In-Reply-To: <519E4E18.1060605@delphij.net>
References:  <519DBC27.9030600@gmx.com> <519DF73E.40307@freebsd.org> <20130523130751.GA53009@StefanEsser.freebsd.org> <519E4E18.1060605@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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) @@ -1537,10 +1537,16 @@ 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?519E83FF.6020107>