From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103361 invoked by alias); 4 Apr 2018 14:21:34 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 103110 invoked by uid 89); 4 Apr 2018 14:21:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx2.suse.de From: Andreas Schwab To: fweimer@redhat.com (Florian Weimer) Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] manual: Result of mbrtowc is a single wide character References: <20180404135733.3097D406F5A23@oldenburg.str.redhat.com> X-Yow: I'm losing my hair..did it go to ATLANTIC CITY?? Date: Wed, 04 Apr 2018 14:21:00 -0000 In-Reply-To: <20180404135733.3097D406F5A23@oldenburg.str.redhat.com> (Florian Weimer's message of "Wed, 04 Apr 2018 15:57:33 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-04/txt/msg00118.txt.bz2 On Apr 04 2018, fweimer@redhat.com (Florian Weimer) wrote: > diff --git a/manual/examples/mbstouwcs.c b/manual/examples/mbstouwcs.c > index 5d223da2ae..3a8b9a65f9 100644 > --- a/manual/examples/mbstouwcs.c > +++ b/manual/examples/mbstouwcs.c > @@ -20,7 +20,7 @@ mbstouwcs (const char *s) > if (nbytes >= (size_t) -2) > /* Invalid input string. */ > return NULL; > - *wcp++ = towupper (tmp[0]); > + *wcp++ = towupper (*tmp); tmp is declared as an array, so tmp[0] is more natural. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."