From f535e5b6db1026d95b6bb5be11f15da3dd5eee90 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 30 May 2014 08:53:55 -0600 Subject: [PATCH] snprintf(): If size is zero, then snprintf() should return the size of the required buffer without writing anyting. From Sami Pelkonen --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4518aec22f..f6d5c674a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7382,3 +7382,6 @@ * 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 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).