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 [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 6865F386F44D for ; Mon, 12 Oct 2020 11:54:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6865F386F44D 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-212-cH0b32bJMUaQ9oFnhJITsw-1; Mon, 12 Oct 2020 07:54:56 -0400 X-MC-Unique: cH0b32bJMUaQ9oFnhJITsw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 50CB810066FB; Mon, 12 Oct 2020 11:54:55 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-112-137.ams2.redhat.com [10.36.112.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8942B10013C1; Mon, 12 Oct 2020 11:54:54 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH 16/28] elf: Add glibc-hwcaps support for LD_LIBRARY_PATH References: <47cb6998ed91f70f122de115b2e03ea5e82e5884.1601569371.git.fweimer@redhat.com> <7bae9b81-f656-976f-7b2a-6c0330243936@linaro.org> Date: Mon, 12 Oct 2020 13:54:52 +0200 In-Reply-To: <7bae9b81-f656-976f-7b2a-6c0330243936@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Fri, 9 Oct 2020 10:19:40 -0300") Message-ID: <87o8l71wxf.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.4 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_H5, 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: Mon, 12 Oct 2020 11:54:59 -0000 * Adhemerval Zanella via Libc-alpha: >> + /* glibc-hwcaps subdirectories. These are exempted from the power >> + set construction below below. */ >> + int32_t hwcaps_subdirs_active = _dl_hwcaps_subdirs_active (); >> + struct count_hwcaps hwcaps_counts = { 0, }; > > Are you trying to outline the first element must be 0 initilized here > with the comma? Empty initializers are non-standard. The , suggests that there is more than one initializer. I can drop the 0, if you prefer. >> +/* Print the HWCAP name itself, indented. */ >> +static void >> +print_hwcaps_subdirectories_name (const struct dl_hwcaps_split *split) >> +{ >> + _dl_write (STDOUT_FILENO, " ", 2); > > Maybe 'strlen (" ")" here? I usually see to use constants related to > string size erro-prone. I prefer it this way here because it documents that there are exactly two spaces (not one, not three). I'm going to send a new patch later today, hopefully addressing Paul Clarke's comment about magic numbers. There should also be a new test. Thanks, Florian -- Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill