Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jan 2018 19:44:14 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        "Pedro F. Giffuni" <pfg@FreeBSD.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r327934 - head/sys/contrib/zstd/lib/freebsd
Message-ID:  <65C751BF-FC03-4541-8D2A-A02C3A1B2A13@FreeBSD.org>
In-Reply-To: <201801131809.w0DI9AZw072646@repo.freebsd.org>
References:  <201801131809.w0DI9AZw072646@repo.freebsd.org>

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

[-- Attachment #1 --]
On 13 Jan 2018, at 19:09, Pedro F. Giffuni <pfg@FreeBSD.org> wrote:
> 
> Author: pfg
> Date: Sat Jan 13 18:09:09 2018
> New Revision: 327934
> URL: https://svnweb.freebsd.org/changeset/base/327934
> 
> Log:
>  zstd: Use memalloc(9) for calloc macro.
> 
>  This is in contrib code but since we only have memalloc(9) in current we
>  will not upstream this.
> 
> 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 17:56:46 2018	(r327933)
> +++ head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h	Sat Jan 13 18:09:09 2018	(r327934)
> @@ -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

s/memalloc/mallocarray/g, in the commit message?

-Dimitry


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWlpTgwAKCRCwXqMKLiCW
owI3AKC9VGFp4w/ejuRUF58BNgKNwRslAQCfTi1D71K4jmjbvLhjYIrBgNAM96w=
=ufB6
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?65C751BF-FC03-4541-8D2A-A02C3A1B2A13>