From owner-svn-src-all@freebsd.org Sat Jan 13 18:09:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40F49E76DCE; Sat, 13 Jan 2018 18:09:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CD1B7013B; Sat, 13 Jan 2018 18:09:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C587165F7; Sat, 13 Jan 2018 18:09:10 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0DI9A88072647; Sat, 13 Jan 2018 18:09:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0DI9AZw072646; Sat, 13 Jan 2018 18:09:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201801131809.w0DI9AZw072646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 13 Jan 2018 18:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327934 - head/sys/contrib/zstd/lib/freebsd X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/sys/contrib/zstd/lib/freebsd X-SVN-Commit-Revision: 327934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jan 2018 18:09:11 -0000 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