public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] strftime/wcsftime: use STRLEN, not strlen Date: Sat, 29 Oct 2022 19:02:17 +0000 (GMT) [thread overview] Message-ID: <20221029190217.1D75F3858423@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a8526cb52bedabd4d6ba4b227a5185627f871aa1 commit a8526cb52bedabd4d6ba4b227a5185627f871aa1 Author: Corinna Vinschen <corinna@vinschen.de> Date: Sat Oct 29 20:15:58 2022 +0200 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> 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 = fmtbuf; STRCPY (fmt, CQ("%e-%b-%")); - fmt += strlen (fmt); + fmt += STRLEN (fmt); if (pad) /* '0' or '+' */ *fmt++ = pad; else
reply other threads:[~2022-10-29 19:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221029190217.1D75F3858423@sourceware.org \ --to=corinna@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).