snprintf(): If size is zero, then snprintf() should return the size of the required buffer without writing anyting. From Sami Pelkonen

This commit is contained in:
Gregory Nutt
2014-05-30 08:53:55 -06:00
parent 59846a8fe9
commit f535e5b6db
+3
View File
@@ -7382,3 +7382,6 @@
* arch/arm/src/stm32/stm32_rtcc.c: Add retry logic to RTC initialization. * arch/arm/src/stm32/stm32_rtcc.c: Add retry logic to RTC initialization.
It sometimes takes longer for the RTC to initialize, at least as noted It sometimes takes longer for the RTC to initialize, at least as noted
on an F2 part. From dlsitzer (2014-5-27). on an F2 part. From dlsitzer (2014-5-27).
* libc/stdio/lib_snprintf.c: If the size passed to snprintf() is zero,
then snprintf() must write nothing, but instead return the size of the
buffer needed to hold the entire string. From Sami Pelkonen (2014-5-30).