Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jan 2018 10:06:52 -0500
From:      Pedro Giffuni <pfg@FreeBSD.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r328340 - in head/sys: fs/ext2fs ufs/ffs ufs/ufs
Message-ID:  <71173c5c-4f3f-2228-7157-2d657ae46eea@FreeBSD.org>
In-Reply-To: <20180126010213.X1950@besplex.bde.org>
References:  <201801241644.w0OGivto028334@repo.freebsd.org> <20180126010213.X1950@besplex.bde.org>

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


On 25/01/2018 09:42, Bruce Evans wrote:
> On Wed, 24 Jan 2018, Pedro F. Giffuni wrote:
>
>> Log:
>>  Revert r327781,  r328093, r328056:
>>  ufs|ext2fs: Revert uses of mallocarray(9).
>>
>>  These aren't really useful: drop them.
>>  Variable unsigning will be brought again later.
>
> Variable "unsigning" (that is, adding unsign extension bugs) is even more
> negatively useful than mallocarray(), so should not be brought back.
>
Any specific case? I already brought those back in r328346.

> Unsigning variables used _only_ for array sizes and element counts 
> doesn't
> cause any new problems (and fixes warnings about converting from 
> signed to
> unsigned when calling malloc*()), but it is a lot of work to check that
> they aren't used for other things where their signedness matters (perhaps
> differences or loops that count down to -1 instead of 0).
>
I did check and had mckusick crosscheck before, but as you say it is 
usually a lot of work and my have missed something.

Pedro.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?71173c5c-4f3f-2228-7157-2d657ae46eea>