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 E66D33857823 for ; Fri, 6 Nov 2020 14:38:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E66D33857823 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-387-v_jnc4VNPHufiVDhKGsGCw-1; Fri, 06 Nov 2020 09:38:35 -0500 X-MC-Unique: v_jnc4VNPHufiVDhKGsGCw-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 363DE18A6286; Fri, 6 Nov 2020 14:38:33 +0000 (UTC) Received: from [10.36.114.76] (ovpn-114-76.ams2.redhat.com [10.36.114.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD0CA5D993; Fri, 6 Nov 2020 14:38:31 +0000 (UTC) Subject: Re: [PATCH] allow empty string as argument to -Map To: Rasmus Villemoes , Fangrui Song Cc: binutils@sourceware.org References: <01faf722-46fc-e0a6-6a58-2490e07937d6@redhat.com> <7ad73b09-c551-9a17-f0fa-0839919158b4@rasmusvillemoes.dk> <0fc094c4-c915-511c-c5da-2654811fbeec@redhat.com> <2ec24e2e-42aa-162f-f8c4-f7588956093b@redhat.com> <2e944a37-8d3d-17a2-ea94-97782972678a@rasmusvillemoes.dk> <890f98cc-8c4d-8286-890c-d8071669f4a1@redhat.com> <4c7c5e55-33d3-ab28-c220-728f7e13d6a9@rasmusvillemoes.dk> <86de3a43-3ad1-ec37-e509-11d5b3a42ce0@redhat.com> <4aecc1e8-40f7-7a6f-7072-62e1193726d2@rasmusvillemoes.dk> <20201105004702.4vrqyu4h2bx4ethh@gmail.com> <572fbbce-4b30-25db-9210-897f06803798@redhat.com> From: Nick Clifton Organization: Red Hat Message-ID: <6806fbf5-0f4c-c4f5-2261-060a1eb6eed5@redhat.com> Date: Fri, 6 Nov 2020 14:38:30 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: 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; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 14:38:40 -0000 Hi Rasmus, > So instead of the four different asprintf, I think you can just do > > percent[0] = 0; > res = asprintf(&new_name, "%s%s%s", config.map_filename, > output_filename, percent[1] ? percent + 1 : ".map"); > > no? Good point - I have applied the patch with this change made. Cheers Nick