svn commit: r286521 - projects/collation/lib/libc/locale

Baptiste Daroussin bapt at freebsd.org
Sun Aug 9 16:39:40 UTC 2015


On Sun, Aug 09, 2015 at 10:54:15PM +1000, Bruce Evans wrote:
> On Sun, 9 Aug 2015, Baptiste Daroussin wrote:
> 
> > Log:
> >  Use asprintf/free instead of snprintf
> 
> 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.
> 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20150809/ce7549a6/attachment.bin>


More information about the svn-src-projects mailing list