From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by sourceware.org (Postfix) with ESMTPS id E87C5385703C for ; Mon, 3 May 2021 20:48:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E87C5385703C Received: by mail-qk1-x72e.google.com with SMTP id i17so6531722qki.3 for ; Mon, 03 May 2021 13:48:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FDMfNK9Y0pOu2qps+p/nqF6cvz3hO758Q2dt/wDluE0=; b=GR9iYiT2Cnf4In+QFaPBCcggs1Xda/d3/IREgyeF8yGQ0SipIH75uRf14jb8AXVKWT cqyTwfqML0uQUyMl7qfGxXfJe1g2SJotcnUkzB1HvaM8nM7y1xQN2w9yrzB3P+HVwmPf YIipsdKkj82AeInfzLf3Ulkleuzkey6XnWL9CBj2iSIwn+2scfp9hlQ5r+TvRvXaudi5 47e3HFuTQph4Aak0n7/CLJ089lUI6P+FQqXUgg89Qt32KmH30EiMOjcrefY0/8BiTuLc qXUqVVNEvgh61yOjw/F4ai/8FJftpGcwxDgoLEWLgRCsyBOX6eoAJPQ+jsSQ17KHkXDa zmHA== X-Gm-Message-State: AOAM5303/stsRGVWmj0LtRxlTaJwLluMV7ZWtyIJXHmoBX0n82DJz5BQ Tyozt54xHhasdNL0MLs/GMQExLA2gJC+tQ== X-Google-Smtp-Source: ABdhPJwvxRV5A5lsZPOYsSvqhIZ0WRqlWd2KDwUqMks1TxpRcSBhn5fjdFJmv3jTttEVukZNr+3odQ== X-Received: by 2002:a37:8442:: with SMTP id g63mr21459976qkd.74.1620074880325; Mon, 03 May 2021 13:48:00 -0700 (PDT) Received: from [192.168.1.4] ([177.194.41.149]) by smtp.gmail.com with ESMTPSA id u4sm9281646qkp.22.2021.05.03.13.47.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 May 2021 13:48:00 -0700 (PDT) Subject: Re: [RFC v2] linux: use __fd_to_filename helper function instead of snprintf. To: =?UTF-8?Q?=c3=89rico_Nogueira?= , libc-alpha@sourceware.org References: From: Adhemerval Zanella Message-ID: Date: Mon, 3 May 2021 17:47:57 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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, 03 May 2021 20:48:02 -0000 On 03/05/2021 17:26, Érico Nogueira wrote: > On Mon May 3, 2021 at 4:26 PM -03, Adhemerval Zanella wrote: >> >> >> On 27/04/2021 10:09, Érico Nogueira via Libc-alpha wrote: >>> Change made to fchmodat and fexecve. There are tests using xasprintf >>> instead of this helper as well, but this commit doesn't touch them. >> >> To adapt the tests it would require either to build it as >> internal/static >> or add fd_to_filename to libsupport. I am not this is really an >> improvement. > > That might explain some of the build failures I got when I tried > changing the tests. > >> >> LGTM, thanks. I will commit this for you. > > Thanks! > > I found a few more places where __fd_to_filename could be used, they are > currently using _fitoa_word together with stpcpy. Would you be > interested in making __fd_to_filename use _fitoa_word or _itoa_word? Or > should it be left as is? I think it might worth to check whether making __fd_to_filename use _itoa_word yield any code size gain, but in general it seems a good refactor.