The patch changes flac_snprintf (in src/share/grabbag/snprintf.c) and its copy local_snprintf (src/libFLAC/metadata_iterators.c). It also adds flac_vsnprintf (src/share/grabbag/snprintf.c) and its copy local_vsnprintf (src/share/win_utf8_io/win_utf8_io.c). And it changes stats_print_info in src/flac/utils.c so it uses flac_vsnprintf instead of vsnprintf. Return value checking becomes unnecessary. Comments? -------------- next part -------------- A non-text attachment was scrubbed... Name: vsnprintf.patch Type: application/octet-stream Size: 5527 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140921/41102089/attachment.obj
lvqcl wrote:> The patch changes flac_snprintf (in src/share/grabbag/snprintf.c) > and its copy local_snprintf (src/libFLAC/metadata_iterators.c). > > It also adds flac_vsnprintf (src/share/grabbag/snprintf.c) and > its copy local_vsnprintf (src/share/win_utf8_io/win_utf8_io.c). > > And it changes stats_print_info in src/flac/utils.c so it uses flac_vsnprintf > instead of vsnprintf. Return value checking becomes unnecessary. > > Comments?I think the only improvement would be to remove the local_* versions in favour of the flac_* versions. Applied. Thanks. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Erik de Castro Lopo wrote:> I think the only improvement would be to remove the local_* versions > in favour of the flac_* versions.This means that flac_* versions (or snprintf.c as a whole) should be moved from grabbag into libFLAC.