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: clean up initialization



details:   https://anonhg.NetBSD.org/src/rev/c8cc55fa0300
branches:  trunk
changeset: 1029127:c8cc55fa0300
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Dec 22 14:35:23 2021 +0000

description:
lint: clean up initialization

No functional change.

diffstat:

 usr.bin/xlint/lint1/init.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r b97c64ea3dc6 -r c8cc55fa0300 usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c        Wed Dec 22 14:32:31 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c        Wed Dec 22 14:35:23 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.229 2021/12/22 00:45:53 rillig Exp $        */
+/*     $NetBSD: init.c,v 1.230 2021/12/22 14:35:23 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.229 2021/12/22 00:45:53 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.230 2021/12/22 14:35:23 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -976,7 +976,7 @@
        if (bl != NULL)
                brace_level_advance(bl, &in->in_max_subscript);
 
-       if (tp == in->in_sym->s_type && tp->t_incomplete_array)
+       if (tp->t_incomplete_array)
                update_type_of_array_of_unknown_size(in->in_sym, len + 1);
 
        return true;
@@ -998,8 +998,7 @@
        debug_enter();
 
        bl = in->in_brace_level;
-       if (bl != NULL &&
-           !brace_level_goto(bl, tn, &in->in_max_subscript)) {
+       if (bl != NULL && !brace_level_goto(bl, tn, &in->in_max_subscript)) {
                in->in_err = true;
                goto done;
        }



Home | Main Index | Thread Index | Old Index