Date: Sun, 9 Aug 2015 18:39:35 +0200 From: Baptiste Daroussin <bapt@freebsd.org> To: Bruce Evans <brde@optusnet.com.au> 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> In-Reply-To: <20150809223647.O2415@besplex.bde.org> References: <201508091150.t79Boo3v096088@repo.freebsd.org> <20150809223647.O2415@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150809163935.GA96980>