Module Name: src Committed By: rillig Date: Sun Jan 24 00:15:20 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: decl.c tree.c src/usr.bin/xlint/lint2: chk.c Log Message: lint: update data types in comments from int to bool To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.131 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.184 -r1.185 src/usr.bin/xlint/lint1/tree.c cvs rdiff -u -r1.36 -r1.37 src/usr.bin/xlint/lint2/chk.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.130 src/usr.bin/xlint/lint1/decl.c:1.131 --- src/usr.bin/xlint/lint1/decl.c:1.130 Mon Jan 18 19:24:09 2021 +++ src/usr.bin/xlint/lint1/decl.c Sun Jan 24 00:15:20 2021 @@ -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 @@ tduptyp(const type_t *tp) } /* - * 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 @@ copy_usage_info(sym_t *sym, sym_t *rdsym } /* - * 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 @@ eqptrtype(const type_t *tp1, const type_ /* - * 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 @@ declare_external_in_block(sym_t *dsym) /* * 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) Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.184 src/usr.bin/xlint/lint1/tree.c:1.185 --- src/usr.bin/xlint/lint1/tree.c:1.184 Sat Jan 23 22:34:01 2021 +++ src/usr.bin/xlint/lint1/tree.c Sun Jan 24 00:15:20 2021 @@ -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 @@ struct_or_union_member(tnode_t *tn, op_t } /* - * 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 @@ merge_qualifiers(type_t **tpp, type_t *t } /* - * 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 Index: src/usr.bin/xlint/lint2/chk.c diff -u src/usr.bin/xlint/lint2/chk.c:1.36 src/usr.bin/xlint/lint2/chk.c:1.37 --- src/usr.bin/xlint/lint2/chk.c:1.36 Mon Jan 18 20:02:34 2021 +++ src/usr.bin/xlint/lint2/chk.c Sun Jan 24 00:15:20 2021 @@ -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 @@ chkadecl(hte_t *hte, sym_t *def, sym_t * /* - * 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 @@ chkadecl(hte_t *hte, sym_t *def, sym_t * * 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 @@ eqargs(type_t *tp1, type_t *tp2, bool *d /* * 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