From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id F14A83987C2E for ; Fri, 30 Oct 2020 20:06:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F14A83987C2E Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-23-gmBIBStIMj6VzSHOeih7Hw-1; Fri, 30 Oct 2020 16:06:00 -0400 X-MC-Unique: gmBIBStIMj6VzSHOeih7Hw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B38D510866A8; Fri, 30 Oct 2020 20:05:59 +0000 (UTC) Received: from greed.delorie.com (ovpn-112-184.rdu2.redhat.com [10.10.112.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D1D85D9D2; Fri, 30 Oct 2020 20:05:59 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.14.7/8.14.7) with ESMTP id 09UK5wtJ018199; Fri, 30 Oct 2020 16:05:58 -0400 From: DJ Delorie To: Joseph Myers Cc: libc-alpha@sourceware.org Subject: Re: Do not use array parameter to new_composite_name (bug 26726) In-Reply-To: (message from Joseph Myers on Wed, 28 Oct 2020 19:57:29 +0000) Date: Fri, 30 Oct 2020 16:05:58 -0400 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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: Fri, 30 Oct 2020 20:06:06 -0000 Joseph Myers writes: > is declared as an array with __LC_LAST elements, but when the category > argument is not LC_ALL, it actually only has one element. Since the Confirmed that new_composite_name() is only called twice; once with LC_ALL and a large-enough array, and once without LC_ALL and a small array. > -new_composite_name (int category, const char *newnames[__LC_LAST]) > +new_composite_name (int category, const char **newnames) Ok. LGTM Reviewed-by: DJ Delorie