Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint lint: update data types in comments from int t...



details:   https://anonhg.NetBSD.org/src/rev/147820c7ecb4
branches:  trunk
changeset: 950275:147820c7ecb4
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jan 24 00:15:20 2021 +0000

description:
lint: update data types in comments from int to bool

diffstat:

 usr.bin/xlint/lint1/decl.c |  16 ++++++++--------
 usr.bin/xlint/lint1/tree.c |  10 +++++-----
 usr.bin/xlint/lint2/chk.c  |  13 ++++++-------
 3 files changed, 19 insertions(+), 20 deletions(-)

diffs (149 lines):

diff -r 068242a54e8a -r 147820c7ecb4 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Sun Jan 24 00:02:38 2021 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Sun Jan 24 00:15:20 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.130 2021/01/18 19:24:09 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.131 2021/01/24 00:15:20 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.130 2021/01/18 19:24:09 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.131 2021/01/24 00:15:20 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -168,7 +168,7 @@
 }
 
 /*
- * Returns 1 if the argument is void or an incomplete array,
+ * Returns whether the argument is void or an incomplete array,
  * struct, union or enum type.
  */
 bool
@@ -2001,8 +2001,8 @@
 }
 
 /*
- * Prints an error and returns 1 if a symbol is redeclared/redefined.
- * Otherwise returns 0 and, in some cases of minor problems, prints
+ * Prints an error and returns true if a symbol is redeclared/redefined.
+ * Otherwise returns false and, in some cases of minor problems, prints
  * a warning.
  */
 bool
@@ -2102,12 +2102,12 @@
 
 
 /*
- * Checks if two types are compatible. Returns 0 if not, otherwise 1.
+ * Checks if two types are compatible.
  *
  * ignqual     ignore qualifiers of type; used for function params
  * promot      promote left type; used for comparison of params of
  *             old style function definitions with params of prototypes.
- * *dowarn     set to 1 if an old style function declaration is not
+ * *dowarn     set to true if an old style function declaration is not
  *             compatible with a prototype
  */
 bool
@@ -2757,7 +2757,7 @@
 
 /*
  * Print an error or a warning if the symbol cannot be initialized due
- * to type/storage class. Return 1 if an error has been detected.
+ * to type/storage class. Return whether an error has been detected.
  */
 static bool
 check_init(sym_t *sym)
diff -r 068242a54e8a -r 147820c7ecb4 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Sun Jan 24 00:02:38 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Sun Jan 24 00:15:20 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.184 2021/01/23 22:34:01 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.185 2021/01/24 00:15:20 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.184 2021/01/23 22:34:01 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.185 2021/01/24 00:15:20 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -386,8 +386,8 @@
        }
 
        /*
-        * Set eq to 0 if there are struct/union members with the same name
-        * and different types and/or offsets.
+        * Set eq to false if there are struct/union members with the same
+        * name and different types and/or offsets.
         */
        eq = true;
        for (csym = msym; csym != NULL; csym = csym->s_link) {
@@ -2614,7 +2614,7 @@
 }
 
 /*
- * Returns 1 if the given structure or union has a constant member
+ * Returns true if the given structure or union has a constant member
  * (maybe recursively).
  */
 static bool
diff -r 068242a54e8a -r 147820c7ecb4 usr.bin/xlint/lint2/chk.c
--- a/usr.bin/xlint/lint2/chk.c Sun Jan 24 00:02:38 2021 +0000
+++ b/usr.bin/xlint/lint2/chk.c Sun Jan 24 00:15:20 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chk.c,v 1.36 2021/01/18 20:02:34 rillig Exp $ */
+/* $NetBSD: chk.c,v 1.37 2021/01/24 00:15:20 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: chk.c,v 1.36 2021/01/18 20:02:34 rillig Exp $");
+__RCSID("$NetBSD: chk.c,v 1.37 2021/01/24 00:15:20 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -1187,10 +1187,9 @@
 
 
 /*
- * Check compatibility of two types. Returns 1 if types are compatible,
- * otherwise 0.
+ * Check compatibility of two types. Returns whether types are compatible.
  *
- * ignqual     if set, ignore qualifiers of outhermost type; used for
+ * ignqual     if set, ignore qualifiers of outermost type; used for
  *             function arguments
  * promote     if set, promote left type before comparison; used for
  *             comparisons of arguments with parameters of old style
@@ -1198,7 +1197,7 @@
  * asgn                left indirected type must have at least the same qualifiers
  *             like right indirected type (for assignments and function
  *             arguments)
- * *dowarn     set to 1 if an old style declaration was compared with
+ * *dowarn     set to true if an old style declaration was compared with
  *             an incompatible prototype declaration
  */
 static bool
@@ -1354,7 +1353,7 @@
 
 /*
  * mnoarg() (matches functions with no argument type information)
- * returns 1 if all parameters of a prototype are compatible with
+ * returns true if all parameters of a prototype are compatible with
  * and old style function declaration.
  * This is the case if following conditions are met:
  *     1. the prototype must have a fixed number of parameters



Home | Main Index | Thread Index | Old Index