From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 1D75F3858423; Sat, 29 Oct 2022 19:02:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D75F3858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667070137; bh=qsW+TUQLIsW95fiHwzspQiun4ijc5LdxOdjZc8Z/QmE=; h=From:To:Subject:Date:From; b=GkhwewZya6RKsJnaxXzWeSd6pE+O1EnXicjCfDEu58CNojMwURHlHm0cqXhZgKZEu IW0zlRxr0Tt0LCLcCu+bY7nfuvwSZpaqiI72B/+OHTCaWAm4rijjRFfNoMYEpzBTym DG6smliV8KcijNxBWM334qP3nzyUl1JbCH2GkI4o= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] strftime/wcsftime: use STRLEN, not strlen X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: d3d63cecbb295ea476edeb75f0d7ca1d507085e5 X-Git-Newrev: a8526cb52bedabd4d6ba4b227a5185627f871aa1 Message-Id: <20221029190217.1D75F3858423@sourceware.org> Date: Sat, 29 Oct 2022 19:02:17 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Da8526cb52be= dabd4d6ba4b227a5185627f871aa1 commit a8526cb52bedabd4d6ba4b227a5185627f871aa1 Author: Corinna Vinschen Date: Sat Oct 29 20:15:58 2022 +0200 strftime/wcsftime: use STRLEN, not strlen =20 Commit 737e2004a3bb accidentally introduced a call to strlen in code used with wide character strings in case of wcsftime. Use STRLEN instead. =20 Fixes: 737e2004a3bb ("strftime.c(__strftime): add %q, %v, tests; tweak = %Z doc") Signed-off-by: Corinna Vinschen Diff: --- newlib/libc/time/strftime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 =3D fmtbuf; STRCPY (fmt, CQ("%e-%b-%")); - fmt +=3D strlen (fmt); + fmt +=3D STRLEN (fmt); if (pad) /* '0' or '+' */ *fmt++ =3D pad; else