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 type handling in initiali...
details: https://anonhg.NetBSD.org/src/rev/aa10e812dbbf
branches: trunk
changeset: 954057:aa10e812dbbf
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Mar 28 14:13:18 2021 +0000
description:
lint: clean up type handling in initialization
No functional change.
diffstat:
usr.bin/xlint/lint1/init.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (33 lines):
diff -r 97b852802c4e -r aa10e812dbbf usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c Sun Mar 28 14:01:49 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c Sun Mar 28 14:13:18 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.162 2021/03/28 14:01:49 rillig Exp $ */
+/* $NetBSD: init.c,v 1.163 2021/03/28 14:13:18 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.162 2021/03/28 14:01:49 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.163 2021/03/28 14:13:18 rillig Exp $");
#endif
#include <stdlib.h>
@@ -859,11 +859,10 @@
level = in->brace_level;
lint_assert(level->bl_remaining > 0);
- in->brace_level = xcalloc(1, sizeof *in->brace_level);
+ in->brace_level = brace_level_new(
+ level->bl_subtype != NULL ? level->bl_subtype : level->bl_type,
+ NULL, 0);
in->brace_level->bl_enclosing = level;
- in->brace_level->bl_type = level->bl_subtype;
- if (in->brace_level->bl_type == NULL)
- in->brace_level->bl_type = level->bl_type;
lint_assert(in->brace_level->bl_type != NULL);
lint_assert(in->brace_level->bl_type->t_tspec != FUNC);
Home |
Main Index |
Thread Index |
Old Index