Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make: remove unnecessary const from parameters



details:   https://anonhg.NetBSD.org/src/rev/d9fc90f7447d
branches:  trunk
changeset: 986991:d9fc90f7447d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Sep 21 21:39:32 2021 +0000

description:
make: remove unnecessary const from parameters

These were leftovers from earlier refactorings, when extracting code to
separate functions.

No functional change.

diffstat:

 usr.bin/make/cond.c  |   8 ++++----
 usr.bin/make/dir.c   |   9 ++++-----
 usr.bin/make/parse.c |  10 ++++------
 3 files changed, 12 insertions(+), 15 deletions(-)

diffs (90 lines):

diff -r eafca1ebf347 -r d9fc90f7447d usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Tue Sep 21 21:03:36 2021 +0000
+++ b/usr.bin/make/cond.c       Tue Sep 21 21:39:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.273 2021/09/21 21:03:36 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.274 2021/09/21 21:39:32 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*     "@(#)cond.c     8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: cond.c,v 1.273 2021/09/21 21:03:36 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.274 2021/09/21 21:39:32 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -413,8 +413,8 @@
  */
 static bool
 CondParser_StringExpr(CondParser *par, const char *start,
-                     bool const doEval, bool const quoted,
-                     Buffer *buf, FStr *const inout_str)
+                     bool doEval, bool quoted,
+                     Buffer *buf, FStr *inout_str)
 {
        VarEvalMode emode;
        const char *nested_p;
diff -r eafca1ebf347 -r d9fc90f7447d usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Tue Sep 21 21:03:36 2021 +0000
+++ b/usr.bin/make/dir.c        Tue Sep 21 21:39:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.272 2021/04/04 10:13:09 rillig Exp $ */
+/*     $NetBSD: dir.c,v 1.273 2021/09/21 21:39:32 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -138,7 +138,7 @@
 #include "job.h"
 
 /*     "@(#)dir.c      8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: dir.c,v 1.272 2021/04/04 10:13:09 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.273 2021/09/21 21:39:32 rillig Exp $");
 
 /*
  * A search path is a list of CachedDir structures. A CachedDir has in it the
@@ -1127,9 +1127,8 @@
 }
 
 static bool
-FindFileAbsolute(SearchPath *path, bool const seenDotLast,
-                const char *const name, const char *const base,
-                char **out_file)
+FindFileAbsolute(SearchPath *path, bool seenDotLast,
+                const char *name, const char *base, char **out_file)
 {
        char *file;
        SearchPathNode *ln;
diff -r eafca1ebf347 -r d9fc90f7447d usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Tue Sep 21 21:03:36 2021 +0000
+++ b/usr.bin/make/parse.c      Tue Sep 21 21:39:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.563 2021/08/14 13:39:43 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.564 2021/09/21 21:39:32 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.563 2021/08/14 13:39:43 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.564 2021/09/21 21:39:32 rillig Exp $");
 
 /* types and constants */
 
@@ -1597,10 +1597,8 @@
  * See the tests depsrc-*.mk.
  */
 static void
-ParseDependencySources(char *const line, char *const cp,
-                      GNodeType const tOp,
-                      ParseSpecial const specType,
-                      SearchPathList ** inout_paths)
+ParseDependencySources(char *line, char *cp, GNodeType tOp,
+                      ParseSpecial specType, SearchPathList **inout_paths)
 {
        if (line[0] == '\0') {
                ParseDependencySourcesEmpty(specType, *inout_paths);



Home | Main Index | Thread Index | Old Index