Module Name: src
Committed By: rillig
Date: Sun Jan 17 11:28:02 UTC 2021
Modified Files:
src/usr.bin/xlint/lint1: decl.c func.c
Log Message:
lint: fix type mismatch for strict bool mode
No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.60 -r1.61 src/usr.bin/xlint/lint1/func.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/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.124 src/usr.bin/xlint/lint1/decl.c:1.125
--- src/usr.bin/xlint/lint1/decl.c:1.124 Sat Jan 16 16:53:23 2021
+++ src/usr.bin/xlint/lint1/decl.c Sun Jan 17 11:28:01 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.124 2021/01/16 16:53:23 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.125 2021/01/17 11:28:01 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.124 2021/01/16 16:53:23 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.125 2021/01/17 11:28:01 rillig Exp $");
#endif
#include <sys/param.h>
@@ -2187,7 +2187,7 @@ eqargs(const type_t *tp1, const type_t *
while (a1 != NULL && a2 != NULL) {
- if (eqtype(a1->s_type, a2->s_type, true, false, dowarn) == 0)
+ if (!eqtype(a1->s_type, a2->s_type, true, false, dowarn))
return false;
a1 = a1->s_next;
Index: src/usr.bin/xlint/lint1/func.c
diff -u src/usr.bin/xlint/lint1/func.c:1.60 src/usr.bin/xlint/lint1/func.c:1.61
--- src/usr.bin/xlint/lint1/func.c:1.60 Sat Jan 16 16:53:23 2021
+++ src/usr.bin/xlint/lint1/func.c Sun Jan 17 11:28:01 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: func.c,v 1.60 2021/01/16 16:53:23 rillig Exp $ */
+/* $NetBSD: func.c,v 1.61 2021/01/17 11:28:01 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: func.c,v 1.60 2021/01/16 16:53:23 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.61 2021/01/17 11:28:01 rillig Exp $");
#endif
#include <stdlib.h>
@@ -639,7 +639,7 @@ switch1(tnode_t *tn)
tp = xcalloc(1, sizeof (type_t));
if (tn != NULL) {
tp->t_tspec = tn->tn_type->t_tspec;
- if ((tp->t_isenum = tn->tn_type->t_isenum) != 0)
+ if ((tp->t_isenum = tn->tn_type->t_isenum) != false)
tp->t_enum = tn->tn_type->t_enum;
} else {
tp->t_tspec = INT;