From owner-svn-src-all@freebsd.org Sat Jan 13 19:24:20 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 96E19E7B15F; Sat, 13 Jan 2018 19:24:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f51.google.com (mail-it0-f51.google.com [209.85.214.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 639D973B48; Sat, 13 Jan 2018 19:24:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f51.google.com with SMTP id q8so1202909itb.2; Sat, 13 Jan 2018 11:24:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=Iqgup9bJOMHioc9XQFBwna1j7Hy0+eX3mkVHM+0hWd0=; b=gxcG4wo5tVKgHOVDRKrY8RoSRZXljJ0D9DC9HKlR87R/e6up77ifKoZtf+mlTaI5os E5iWn6TLUfi88lzF+y+D3c0vggDW0TMTm2wb5bNR+nq6y5UbCuu+ebfdtvPN4NKg92vY 5nqvnIi8XRsot3lLEXWaKqFEr+mbnxMrta+o0WMJjdqkS94ctDky4weuPRrADHGx1zD6 5rhgAvLegnzo2pJaO9UMd44rL0TgGTYYmVZLGv51Hk271/fKyvydDJwxVul4Vt8LHwpt U7jbLhv7HNckueePyWoeqWnVPUkD8xouz4DkFc7wbTzsy0LFIYyAPz7UZdF3SCWm6Xsa SfwQ== X-Gm-Message-State: AKwxytei+uePzVVdo/UpjkyYnVu+LLBGyX1YxWVNdN+jaIXuy/8hiqth eL+iiM8KV2RmeDvZ6fFmmkBX9D0+ X-Google-Smtp-Source: ACJfBotx6XXf1vJNla/IL8S1CRPTWH/nKuPWIAp65IoXn4il93UqimMPA0lAx0r2gWcOWSz6XVlt8A== X-Received: by 10.36.1.66 with SMTP id 63mr9295502itk.104.1515871458642; Sat, 13 Jan 2018 11:24:18 -0800 (PST) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com. [209.85.214.43]) by smtp.gmail.com with ESMTPSA id q2sm3440710ite.17.2018.01.13.11.24.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jan 2018 11:24:18 -0800 (PST) Received: by mail-it0-f43.google.com with SMTP id q8so1202897itb.2; Sat, 13 Jan 2018 11:24:18 -0800 (PST) X-Received: by 10.36.114.193 with SMTP id x184mr8897496itc.71.1515871458231; Sat, 13 Jan 2018 11:24:18 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.74.80 with HTTP; Sat, 13 Jan 2018 11:24:17 -0800 (PST) In-Reply-To: <201801131902.w0DJ2p5m097642@repo.freebsd.org> References: <201801131902.w0DJ2p5m097642@repo.freebsd.org> From: Conrad Meyer Date: Sat, 13 Jan 2018 11:24:17 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r327940 - head/sys/contrib/zstd/lib/freebsd To: "Pedro F. Giffuni" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" 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 19:24:20 -0000 This is not in contrib code -- https://lists.freebsd.org/pipermail/svn-src-all/2018-January/156505.html . 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 >