From owner-svn-src-projects@freebsd.org Sun Aug 9 16:39:40 2015 Return-Path: Delivered-To: svn-src-projects@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 08A2599DF09 for ; Sun, 9 Aug 2015 16:39:40 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (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 74B9B8A8; Sun, 9 Aug 2015 16:39:39 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wibhh20 with SMTP id hh20so121755195wib.0; Sun, 09 Aug 2015 09:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=yVDvmBjc4JJwHijbAn9gRWXkd36qsPchyh93Zxielcw=; b=iywuXrkdSXkgiNy40cekAfFvZ1l09ffCZ4sKJN2YjuN0k5IuVpLu2tmv5xAAKER+Q+ gT+hIXBjp+MWpILPeay6352m018HudxfP9pdOaeyrFfcxJ1o93WGMKFGKXp9B7UPsTMz /WkkHCxcSwMAt2cu4qTr4W0D7lMKKDCiTPtkd6ss9wpo7SQbWlnroJr5xCDAPRxRVtc+ OVtdJ5p0Ov0PqB0rSaSWbV6CFk9Z0lXFY63VVdrHJ2axncst4o0T4sB1NI86jMWOsHwv 6PbhtFULR3ti2iCnD3XGXLUXpXpis1UqpdpT5MQ1zUtBzLkwofvtXQ+rFy//b8pOkwMi mc/Q== X-Received: by 10.195.11.37 with SMTP id ef5mr35190349wjd.60.1439138378026; Sun, 09 Aug 2015 09:39:38 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id ny7sm9375947wic.11.2015.08.09.09.39.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Aug 2015 09:39:37 -0700 (PDT) Sender: Baptiste Daroussin Date: Sun, 9 Aug 2015 18:39:35 +0200 From: Baptiste Daroussin To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-projects@freebsd.org, theraven@FreeBSD.org Subject: Re: svn commit: r286521 - projects/collation/lib/libc/locale Message-ID: <20150809163935.GA96980@ivaldir.etoilebsd.net> References: <201508091150.t79Boo3v096088@repo.freebsd.org> <20150809223647.O2415@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: <20150809223647.O2415@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Aug 2015 16:39:40 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 09, 2015 at 10:54:15PM +1000, Bruce Evans wrote: > On Sun, 9 Aug 2015, Baptiste Daroussin wrote: >=20 > > Log: > > Use asprintf/free instead of snprintf >=20 > Why? It takes 3 times as much code, and immediately gave you a memory > leak when you wrote only twice as much. You fixed the memory leak in the > next commit, but it might not always be so easy to see. >=20 Well on the review David recommended to use asprintf rather than snprintf. While I dislike the option (as I stated in the review) given he wrote most = of the recent changes (xlocale) I followed his recommendations. Bapt --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlXHgkcACgkQ8kTtMUmk6EwOhQCdGDEiGH5EZp1fAqgup9qB26HR X50An1Ls34m4B+ON78liZwRpa0Ad19LI =IpzU -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC--