Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Mar 2017 13:21:51 -0500
From:      Pedro Giffuni <pfg@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r314969 - head/usr.bin/localedef
Message-ID:  <3612f18f-4389-87b0-d118-90a9934c745a@FreeBSD.org>
In-Reply-To: <20170309181124.GF16105@kib.kiev.ua>
References:  <201703091806.v29I6mNx080192@repo.freebsd.org> <20170309181124.GF16105@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello;


On 3/9/2017 1:11 PM, Konstantin Belousov wrote:
> On Thu, Mar 09, 2017 at 06:06:48PM +0000, Pedro F. Giffuni wrote:
>> Author: pfg
>> Date: Thu Mar  9 18:06:48 2017
>> New Revision: 314969
>> URL: https://svnweb.freebsd.org/changeset/base/314969
>>
>> Log:
>>    localedef(1): Fix mismatch in previous commit.
>>    
>>    delete_category is meant to replace fclose() and unlink().
>>    This broke world.
>>    
>>    Found by:	kib
>>    Pointedhat:	pfg
>>
>> Modified:
>>    head/usr.bin/localedef/localedef.c
>>
>> Modified: head/usr.bin/localedef/localedef.c
>> ==============================================================================
>> --- head/usr.bin/localedef/localedef.c	Thu Mar  9 17:53:37 2017	(r314968)
>> +++ head/usr.bin/localedef/localedef.c	Thu Mar  9 18:06:48 2017	(r314969)
>> @@ -137,8 +137,6 @@ close_category(FILE *f)
>>   {
>>   	if (fchmod(fileno(f), 0644) < 0 ||
>>   	    fclose(f) != 0) {
>> -		(void) fclose(f);
>> -		(void) unlink(category_file());
>>   		errf(strerror(errno));
>>   		delete_category(f);
>>   	}
> I still think that the fclose() call in the condition is also excessive.
Huge thanks for reporting all this.

I agree ... tha fclose() is also in illumos so I will see with them.

Thanks again,

Pedro.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3612f18f-4389-87b0-d118-90a9934c745a>