Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: inline local variable in build_fun...



details:   https://anonhg.NetBSD.org/src/rev/7cda2e6d3984
branches:  trunk
changeset: 371246:7cda2e6d3984
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 01 10:07:55 2022 +0000

description:
lint: inline local variable in build_function_argument

No functional change.

diffstat:

 usr.bin/xlint/lint1/tree.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (38 lines):

diff -r 44e4649d0d35 -r 7cda2e6d3984 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Sat Oct 01 10:04:06 2022 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Sat Oct 01 10:07:55 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.482 2022/10/01 10:04:06 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.483 2022/10/01 10:07:55 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.482 2022/10/01 10:04:06 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.483 2022/10/01 10:07:55 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -4049,8 +4049,6 @@
 tnode_t *
 build_function_argument(tnode_t *args, tnode_t *arg)
 {
-       tnode_t *ntn;
-
        /*
         * If there was a serious error in the expression for the argument,
         * create a dummy argument so the positions of the remaining arguments
@@ -4059,9 +4057,7 @@
        if (arg == NULL)
                arg = build_integer_constant(INT, 0);
 
-       ntn = new_tnode(PUSH, arg->tn_sys, arg->tn_type, arg, args);
-
-       return ntn;
+       return new_tnode(PUSH, arg->tn_sys, arg->tn_type, arg, args);
 }
 
 /*



Home | Main Index | Thread Index | Old Index