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 <jeffreya...@gmail.com
<mailto:jeffreya...@gmail.com>> 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<costas.argy...@gmail.com>
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<costas.argy...@gmail.com
---
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