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: make typeok_scalar_strict_bool sim...
details: https://anonhg.NetBSD.org/src/rev/2c016b55f357
branches: trunk
changeset: 984863:2c016b55f357
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Jul 26 16:22:24 2021 +0000
description:
lint: make typeok_scalar_strict_bool simpler
No functional change.
diffstat:
usr.bin/xlint/lint1/ckbool.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 504c3cf69ec7 -r 2c016b55f357 usr.bin/xlint/lint1/ckbool.c
--- a/usr.bin/xlint/lint1/ckbool.c Mon Jul 26 12:49:13 2021 +0000
+++ b/usr.bin/xlint/lint1/ckbool.c Mon Jul 26 16:22:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ckbool.c,v 1.7 2021/07/04 09:13:59 rillig Exp $ */
+/* $NetBSD: ckbool.c,v 1.8 2021/07/26 16:22:24 rillig Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: ckbool.c,v 1.7 2021/07/04 09:13:59 rillig Exp $");
+__RCSID("$NetBSD: ckbool.c,v 1.8 2021/07/26 16:22:24 rillig Exp $");
#endif
#include <string.h>
@@ -181,7 +181,7 @@
if (!mp->m_takes_bool) {
bool binary = mp->m_binary;
- bool lbool = ln->tn_type->t_tspec == BOOL;
+ bool lbool = lt == BOOL;
bool ok = true;
if (!binary && lbool) {
@@ -194,7 +194,7 @@
error(336, op_name(op));
ok = false;
}
- if (binary && rn->tn_type->t_tspec == BOOL) {
+ if (binary && rt == BOOL) {
/* right operand of '%s' must not be bool */
error(337, op_name(op));
ok = false;
Home |
Main Index |
Thread Index |
Old Index