diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2022-10-29 21:15:58 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2022-10-29 21:15:58 +0300 |
commit | a8526cb52bedabd4d6ba4b227a5185627f871aa1 (patch) | |
tree | 83dad1e75e31950a4492940633943fd45eed506c /newlib | |
parent | d3d63cecbb295ea476edeb75f0d7ca1d507085e5 (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>
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/time/strftime.c | 2 |
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 |