From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 20EBF3858C54 for ; Wed, 7 Jun 2023 02:52:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 20EBF3858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1b065154b79so1133845ad.1 for ; Tue, 06 Jun 2023 19:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686106342; x=1688698342; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=TEZUb7/C5ifrowNAgA37krb6ZI6zOJXrtUUL9btSTsI=; b=p3OXj+lnrBTydaia/bvPuGu+ciJb2Jd+bdYsjfw4ABvuXvrAcShZsR/0NTklNvltIs N37eQrzKQNKRAlt/jMLROQ/cvfDYV+0yUTUABcCVR/IB3gd0rNjMWJHEXAqci3B0zZgk C6Vg0ioqIDWC/iiLqlu0qO3sudq+Vey6EjiB9r14RdcTPYyWzYjnYxwE/rkksf5UnKep j6CH8OYjBP8KG00v81ECDjfBvH5wfmM6wpjNssRf2aknN8GqFcJTM2MjS9iWm4kgY9f6 6FVsu+c4Ggr2IFUaqyZRnxwMWWFuKf9lQtplDaSHVTg39+Fec76cEAw7FzMXc4xJGLhP mBJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686106342; x=1688698342; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TEZUb7/C5ifrowNAgA37krb6ZI6zOJXrtUUL9btSTsI=; b=Nzp6VrAuc/zHmlcW0VWE8ls+JiLrR3j79CDC70KHqGBzxCSDpKv6exe0xPv3WgC3PY TbGxYsCHO32O+zlOT/o8kwMAEPK6i7BuxAiu4fRkv4DFp3gQ/kq5dxxI1dyVM9YJURys Wu8p9VBQte9p6rzR0H5eRFvpar/NdHzAc3o3qYH/zQi2TOu+NGkUiRGjn7CDAd0MWe8W xa9kSr/bHz3iRdBIEYVvawXeqm4JnPG52vknaDGlhAUKusFdjJbrUDuIvtCAYM+7wbnK Bfe1w/vdh8JUTkk+AIgL0bP5ysv0ugBl1sW6bFDjHlEU2FXagQhmxGwunZ7Np1bQtNJX JCew== X-Gm-Message-State: AC+VfDyEy/VnrymjNK9In9RDWxGNiP/gXBe2EaCE3myu0U4caTpNZtVL wRUcRINJrT1fs5xDvDtJvgLPlm0R5dA= X-Google-Smtp-Source: ACHHUZ6z9ozEf5jB9Ns2flsFhJo8vYi3Gr2wTNQxB7om3oBc06hzR4ggX3wqluoWSxi+537CVMUNhg== X-Received: by 2002:a17:903:2449:b0:1ad:ea13:1914 with SMTP id l9-20020a170903244900b001adea131914mr14680284pls.30.1686106342570; Tue, 06 Jun 2023 19:52:22 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id n11-20020a170902e54b00b001b03b1e2e1bsm9228427plf.115.2023.06.06.19.52.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jun 2023 19:52:21 -0700 (PDT) Message-ID: Date: Tue, 6 Jun 2023 20:52:20 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] libiberty: writeargv: Simplify function error mode. Content-Language: en-US To: Costas Argyris Cc: gcc-patches@gcc.gnu.org References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLY,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 6/6/23 02:44, Costas Argyris wrote: > You are right, this is also a remnant of the old function design > that I completely missed.    Here is the follow-up patch for that. > > Thanks for pointing it out. > > Costas > > On Tue, 6 Jun 2023 at 04:12, Jeff Law > wrote: > > > > On 6/5/23 08:37, Costas Argyris via Gcc-patches wrote: > > writeargv can be simplified by getting rid of the error exit mode > > that was only relevant many years ago when the function used > > to open the file descriptor internally. > [ ... ] > Thanks.  I've pushed this to the trunk. > > You could (as a follow-up) simplify it even further.  There's no need > for the status variable as far as I can tell.  You could just have the > final return be "return 0;" instead of "return status;". > > Jeff > > > 0001-libiberty-writeargv-Remove-unnecessary-status-variab.patch > > From 13fdfea60eeac64e028315392614b955e998487d Mon Sep 17 00:00:00 2001 > From: Costas Argyris > Date: Tue, 6 Jun 2023 09:15:48 +0100 > Subject: [PATCH] libiberty: writeargv: Remove unnecessary status variable. > > Follow-up from 4d1e4ce986f pointed out by jlaw. > > Signed-off-by: Costas Argyris --- > libiberty/argv.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Thanks. I created a ChangeLog entry and committed this change to the trunk. Jeff