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_expr
details: https://anonhg.NetBSD.org/src/rev/d795313d627c
branches: trunk
changeset: 982008:d795313d627c
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Mar 28 18:21:28 2021 +0000
description:
lint: clean up initialization_expr
No functional change.
diffstat:
usr.bin/xlint/lint1/init.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diffs (46 lines):
diff -r 967c358594a0 -r d795313d627c usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c Sun Mar 28 18:18:22 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c Sun Mar 28 18:21:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.168 2021/03/28 18:18:22 rillig Exp $ */
+/* $NetBSD: init.c,v 1.169 2021/03/28 18:21:28 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.168 2021/03/28 18:18:22 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.169 2021/03/28 18:21:28 rillig Exp $");
#endif
#include <stdlib.h>
@@ -1354,21 +1354,20 @@
if (initialization_init_array_using_string(in, tn)) {
debug_step("after initializing the string:");
- /* XXX: why not clean up the initstack here already? */
- goto done_initstack;
+ goto done_debug;
}
initialization_next_nobrace(in, tn);
if (in->initerr || tn == NULL)
- goto done_initstack;
+ goto done_debug;
+
+ /* Using initsym here is better than nothing. */
+ check_init_expr(sclass, in->brace_level->bl_type, in->initsym, tn);
in->brace_level->bl_remaining--;
debug_step("%d elements remaining", in->brace_level->bl_remaining);
- /* Using initsym here is better than nothing. */
- check_init_expr(sclass, in->brace_level->bl_type, in->initsym, tn);
-
-done_initstack:
+done_debug:
initialization_debug(in);
done:
Home |
Main Index |
Thread Index |
Old Index