aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/time
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-10-29 20:15:58 +0200
committerCorinna Vinschen <corinna@vinschen.de>2022-10-29 20:15:58 +0200
commita8526cb52bedabd4d6ba4b227a5185627f871aa1 (patch)
tree83dad1e75e31950a4492940633943fd45eed506c /newlib/libc/time
parentd3d63cecbb295ea476edeb75f0d7ca1d507085e5 (diff)
downloadnewlib-a8526cb52bedabd4d6ba4b227a5185627f871aa1.zip
newlib-a8526cb52bedabd4d6ba4b227a5185627f871aa1.tar.gz
newlib-a8526cb52bedabd4d6ba4b227a5185627f871aa1.tar.bz2
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>
Diffstat (limited to 'newlib/libc/time')
-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 420745d..56f227c 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