simplify vasprintf implementation
authorRich Felker <dalias@aerifal.cx>
Wed, 4 Jun 2014 07:39:22 +0000 (03:39 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 4 Jun 2014 07:39:22 +0000 (03:39 -0400)
commit6a25313c1122629b43b990ada70af1c209f03a54
treef91e8a217f690c27cfa27e9914489081630f8237
parentbdad2fefb206d9727d4a3254f7883b8455452d89
simplify vasprintf implementation

the old implementation preallocated a buffer in order to try to avoid
calling vsnprintf more than once. not only did this potentially lead
to memory fragmentation from trimming with realloc; it also pulled in
realloc/free, which otherwise might not be needed in a static linked
program.
src/stdio/vasprintf.c