diff options
author | Costas Argyris <costas.argyris@gmail.com> | 2023-06-06 20:50:07 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2023-06-06 20:50:07 -0600 |
commit | 3fe017ee79211820ca774f4c87ef86753eeef567 (patch) | |
tree | 123c684cc4b7b68518326ba243c3db6bc1ffd832 /gcc/expr.cc | |
parent | 64d90d06d2db43538c8a45adbb3d74842f7868ae (diff) | |
download | gcc-3fe017ee79211820ca774f4c87ef86753eeef567.zip gcc-3fe017ee79211820ca774f4c87ef86753eeef567.tar.gz gcc-3fe017ee79211820ca774f4c87ef86753eeef567.tar.bz2 |
libiberty: writeargv: Simplify function error mode.
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 <jeffreyalaw@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;".
libiberty/
* argv.c (writeargv): Constant propagate "0" for "status",
simplifying the code slightly.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions