Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jan 2018 14:54:19 -0500
From:      Pedro Giffuni <pfg@FreeBSD.org>
To:        cem@freebsd.org
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r327940 - head/sys/contrib/zstd/lib/freebsd
Message-ID:  <db2419fe-8222-37fa-8ef6-d49616439d5e@FreeBSD.org>
In-Reply-To: <CAG6CVpXN1=yDvbmjV9u-hn1_jNkq937zuDTp=WXy9CM4A9P3aw@mail.gmail.com>
References:  <201801131902.w0DJ2p5m097642@repo.freebsd.org> <CAG6CVpXN1=yDvbmjV9u-hn1_jNkq937zuDTp=WXy9CM4A9P3aw@mail.gmail.com>

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


On 01/13/18 14:24, Conrad Meyer wrote:
> This is not in contrib code --
> https://lists.freebsd.org/pipermail/svn-src-all/2018-January/156505.html
> .

Thanks, I read it late...

Shouldn't the local code be in usr.bin/zstd ?

Pedro.

<http://src.illumos.org/source/xref/freebsd-head/usr.bin/>;
>
> On Sat, Jan 13, 2018 at 11:02 AM, Pedro F. Giffuni <pfg@freebsd.org> wrote:
>> Author: pfg
>> Date: Sat Jan 13 19:02:51 2018
>> New Revision: 327940
>> URL: https://svnweb.freebsd.org/changeset/base/327940
>>
>> Log:
>>    zstd: Use mallocarray(9) for calloc macro.
>>
>>    This is in contrib code but since we only have mallocarray(9) in current
>>    we will not upstream this.
>>
>>    This effectively brings back r327934, which was reverted to correct the
>>    log message.
>>
>> Modified:
>>    head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h
>>
>> Modified: head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h
>> ==============================================================================
>> --- head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h   Sat Jan 13 19:02:08 2018        (r327939)
>> +++ head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h   Sat Jan 13 19:02:51 2018        (r327940)
>> @@ -46,7 +46,7 @@ MALLOC_DECLARE(M_ZSTD);
>>   #define malloc(x)      (malloc)((x), M_ZSTD, M_WAITOK)
>>   #define free(x)                (free)((x), M_ZSTD)
>>   /* in zstd's use of calloc, a is always 1 */
>> -#define calloc(a,b)    (malloc)((a)*(b), M_ZSTD, M_WAITOK | M_ZERO)
>> +#define calloc(a,b)    (mallocarray)((a), (b), M_ZSTD, M_WAITOK | M_ZERO)
>>   #endif
>>
>>   #ifdef __cplusplus
>>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?db2419fe-8222-37fa-8ef6-d49616439d5e>