From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 36A2A385801A for ; Sat, 27 Mar 2021 17:45:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 36A2A385801A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (port=45995 helo=deneb.enyo.de) by albireo.enyo.de ([172.17.140.2]) with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1lQD06-0002Xv-QH; Sat, 27 Mar 2021 17:45:30 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1lQD06-0005Sd-Lv; Sat, 27 Mar 2021 18:45:30 +0100 From: Florian Weimer To: "H.J. Lu via Libc-alpha" Subject: Re: [PATCH] Initialize wchar_t string with wmemset [BZ #27655] References: <20210327162433.3215479-1-hjl.tools@gmail.com> Date: Sat, 27 Mar 2021 18:45:30 +0100 In-Reply-To: <20210327162433.3215479-1-hjl.tools@gmail.com> (H. J. Lu via Libc-alpha's message of "Sat, 27 Mar 2021 09:24:33 -0700") Message-ID: <87lfa88p8l.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Mar 2021 17:45:35 -0000 * H. J. Lu via Libc-alpha: > Use wmemset to initialize wchar_t string. > --- > string/test-strnlen.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/string/test-strnlen.c b/string/test-strnlen.c > index a49d93afa2..6163079d12 100644 > --- a/string/test-strnlen.c > +++ b/string/test-strnlen.c > @@ -27,6 +27,7 @@ > > #ifndef WIDE > # define STRNLEN strnlen > +# define MEMSET memset > # define CHAR char > # define BIG_CHAR CHAR_MAX > # define MIDDLE_CHAR 127 > @@ -34,6 +35,7 @@ > #else > # include > # define STRNLEN wcsnlen > +# define MEMSET memset > # define CHAR wchar_t > # define BIG_CHAR WCHAR_MAX > # define MIDDLE_CHAR 1121 Shouldn't the second one be wmemset?