Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-10-29 21:15:58 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-10-29 21:15:58 +0300
commita8526cb52bedabd4d6ba4b227a5185627f871aa1 (patch)
tree83dad1e75e31950a4492940633943fd45eed506c
parentd3d63cecbb295ea476edeb75f0d7ca1d507085e5 (diff)
strftime/wcsftime: use STRLEN, not strlen
Commit 737e2004a3bb accidentally introduced a call to strlen in code used with wide character strings in case of wcsftime. Use STRLEN instead. Fixes: 737e2004a3bb ("strftime.c(__strftime): add %q, %v, tests; tweak %Z doc") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--newlib/libc/time/strftime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/time/strftime.c b/newlib/libc/time/strftime.c
index 420745d90..56f227c5f 100644
--- a/newlib/libc/time/strftime.c
+++ b/newlib/libc/time/strftime.c
@@ -1260,7 +1260,7 @@ recurse:
format. Recurse to avoid need to replicate %b and %Y formation. */
CHAR fmtbuf[32], *fmt = fmtbuf;
STRCPY (fmt, CQ("%e-%b-%"));
- fmt += strlen (fmt);
+ fmt += STRLEN (fmt);
if (pad) /* '0' or '+' */
*fmt++ = pad;
else