Module Name: src Committed By: rillig Date: Wed Dec 22 14:35:23 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: clean up initialization No functional change. To generate a diff of this commit: cvs rdiff -u -r1.229 -r1.230 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.229 src/usr.bin/xlint/lint1/init.c:1.230 --- src/usr.bin/xlint/lint1/init.c:1.229 Wed Dec 22 00:45:53 2021 +++ src/usr.bin/xlint/lint1/init.c Wed Dec 22 14:35:23 2021 @@ -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 @@ initialization_init_array_from_string(in 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 @@ initialization_expr(initialization *in, 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; }