From owner-svn-src-head@freebsd.org Sat Jan 13 19:54:27 2018 Return-Path: Delivered-To: svn-src-head@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 CC7CAE7C89E for ; Sat, 13 Jan 2018 19:54:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic303-37.consmr.mail.gq1.yahoo.com (sonic303-37.consmr.mail.gq1.yahoo.com [98.137.64.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A56CE74A93 for ; Sat, 13 Jan 2018 19:54:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1515873261; bh=Rbn9NZx+TOdpHW12SF7c+slwQghMF9MYUPNyp9mPNck=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=I500I6IABq/Nm79FZ0gqBVNddfzcIdcIyfLe749nuVki2+Lznicdx8TcUq0TG1rYkH9mbMSEIDngV/hAOXqhcU3aqcpVbhumr+vkDK3brrqTUI3mIaJaJV5fm+QmwRLKxM2QAOTehWv6tOvsEjUQpCx70Jmih3j/ZVs60IK1n92La8+V25K1ek8uHKKgxKtEIB7iA8PEfypTGB0WlXu8gNYElCZzqHJLQbjpdYGUZ5QKy4nCco5Xbiw/4NCSoP5bhFwQX4vhrogYjrgsSd1j1qEHq3mujApeeqsEmTTfR2Cb5Z2xBzafIRRF/35eda91CSwbfJORiIltCJembW2J8w== X-YMail-OSG: aWu9jm0VM1nPa1rfrUc0XpJWBu6AqUc0agvVK_rCejBRD2r1teMWwA0tL_q9LkJ T7tOH4a._C7A71OhV5yrmOpiRrqwqjnx4TB38xPkErI7bLDzVkc1AZFzNGZTmTXtCOz0y1oegDK5 w_9.nrIECHbj8WNjrMKv8j7Tk8Ho95dkh6.WCofcs54wLwR2IwAhduwdDe9oPibZ4AglCos3QHBS WNxnQI047BCNuQyiKQhLMrh1lGofbNc.sigMY5sWVcox2JFTG4LKldfmlUpuyCLY0A33zwGx.9pR 2nwaqzGNa09ovkRAnRCvmZsNZbHZL2BaoNWB.T03mMQCnzXh4lWGR9vyxaRJm9wdOURhk1l1N5Fz kjHbcgoereJ5T.DwHSyFGPkDzpFxJdevnQ9Nn4jfzHSiqkhJrEz1fTz1oD8yyNRHCBPoG_yzaKtU UPUEWUvSSnYnnY_gmej9855zFTgwcKB21c41YeBjgajSmuLdVMM80BsPWE_n1LALAs2k4YjwrhA- - Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Sat, 13 Jan 2018 19:54:21 +0000 Received: from smtp108.rhel.mail.gq1.yahoo.com (EHLO [192.168.0.8]) ([216.39.57.224]) by smtp408.mail.gq1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID 36f354086b769ddf992a87b591bd6e8e; Sat, 13 Jan 2018 19:54:19 +0000 (UTC) Subject: Re: svn commit: r327940 - head/sys/contrib/zstd/lib/freebsd To: cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801131902.w0DJ2p5m097642@repo.freebsd.org> From: Pedro Giffuni Message-ID: Date: Sat, 13 Jan 2018 14:54:19 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jan 2018 19:54:27 -0000 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. > > On Sat, Jan 13, 2018 at 11:02 AM, Pedro F. Giffuni 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 >>