Module Name: src Committed By: rillig Date: Sun Nov 15 22:31:03 UTC 2020
Modified Files: src/usr.bin/make: compat.c parse.c suff.c Log Message: make(1): clean up coding style in compat, parse, suff To generate a diff of this commit: cvs rdiff -u -r1.182 -r1.183 src/usr.bin/make/compat.c cvs rdiff -u -r1.441 -r1.442 src/usr.bin/make/parse.c cvs rdiff -u -r1.235 -r1.236 src/usr.bin/make/suff.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/make/compat.c diff -u src/usr.bin/make/compat.c:1.182 src/usr.bin/make/compat.c:1.183 --- src/usr.bin/make/compat.c:1.182 Sat Nov 14 14:16:01 2020 +++ src/usr.bin/make/compat.c Sun Nov 15 22:31:03 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.182 2020/11/14 14:16:01 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.183 2020/11/15 22:31:03 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -96,7 +96,7 @@ #include "pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.182 2020/11/14 14:16:01 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.183 2020/11/15 22:31:03 rillig Exp $"); static GNode *curTarg = NULL; static pid_t compatChild; @@ -511,9 +511,8 @@ Compat_Make(GNode *gn, GNode *pgn) * If the user is just seeing if something is out-of-date, exit now * to tell him/her "yes". */ - if (opts.queryFlag) { + if (opts.queryFlag) exit(1); - } /* * We need to be re-made. We also have to make sure we've got a $? Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.441 src/usr.bin/make/parse.c:1.442 --- src/usr.bin/make/parse.c:1.441 Sun Nov 15 12:02:44 2020 +++ src/usr.bin/make/parse.c Sun Nov 15 22:31:03 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.441 2020/11/15 12:02:44 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.442 2020/11/15 22:31:03 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -117,7 +117,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.441 2020/11/15 12:02:44 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.442 2020/11/15 22:31:03 rillig Exp $"); /* types and constants */ @@ -865,7 +865,7 @@ ParseDoSrcKeyword(const char *src, Parse if (*src == '.' && ch_isupper(src[1])) { int keywd = ParseFindKeyword(src); if (keywd != -1) { - int op = parseKeywords[keywd].op; + GNodeType op = parseKeywords[keywd].op; if (op != 0) { ApplyDependencyOperator(op); return TRUE; @@ -1673,7 +1673,7 @@ ParseDoDependency(char *line) * a .SILENT line creates silence when making all targets * a .PATH removes all directories from the search path(s). */ - if (!*line) { + if (line[0] == '\0') { ParseDoDependencySourcesEmpty(specType, paths); } else if (specType == SP_MFLAGS) { /* Index: src/usr.bin/make/suff.c diff -u src/usr.bin/make/suff.c:1.235 src/usr.bin/make/suff.c:1.236 --- src/usr.bin/make/suff.c:1.235 Sun Nov 8 19:53:11 2020 +++ src/usr.bin/make/suff.c Sun Nov 15 22:31:03 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: suff.c,v 1.235 2020/11/08 19:53:11 rillig Exp $ */ +/* $NetBSD: suff.c,v 1.236 2020/11/15 22:31:03 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -129,7 +129,7 @@ #include "dir.h" /* "@(#)suff.c 8.4 (Berkeley) 3/21/94" */ -MAKE_RCSID("$NetBSD: suff.c,v 1.235 2020/11/08 19:53:11 rillig Exp $"); +MAKE_RCSID("$NetBSD: suff.c,v 1.236 2020/11/15 22:31:03 rillig Exp $"); #define SUFF_DEBUG0(text) DEBUG0(SUFF, text) #define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1) @@ -1793,9 +1793,8 @@ sfnd_abort: * If the suffix indicates that the target is a library, mark that in * the node's type field. */ - if (targ->suff->flags & SUFF_LIBRARY) { + if (targ->suff->flags & SUFF_LIBRARY) gn->type |= OP_LIB; - } /* * Check for overriding transformation rule implied by sources