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: have as few statements as possible betwee...
details: https://anonhg.NetBSD.org/src/rev/6659b47df1d1
branches: trunk
changeset: 359494:6659b47df1d1
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Jan 07 21:00:49 2022 +0000
description:
make: have as few statements as possible between va_start and va_end
No functional change.
diffstat:
usr.bin/make/main.c | 9 +++++----
usr.bin/make/parse.c | 7 ++++---
2 files changed, 9 insertions(+), 7 deletions(-)
diffs (77 lines):
diff -r d9a07be85d42 -r 6659b47df1d1 usr.bin/make/main.c
--- a/usr.bin/make/main.c Fri Jan 07 20:54:45 2022 +0000
+++ b/usr.bin/make/main.c Fri Jan 07 21:00:49 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.566 2022/01/07 20:37:25 rillig Exp $ */
+/* $NetBSD: main.c,v 1.567 2022/01/07 21:00:49 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.566 2022/01/07 20:37:25 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.567 2022/01/07 21:00:49 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -1805,9 +1805,10 @@
if (f == stdout)
f = stderr;
(void)fflush(stdout);
+
for (;;) {
+ fprintf(f, "%s: ", progname);
va_start(ap, fmt);
- fprintf(f, "%s: ", progname);
(void)vfprintf(f, fmt, ap);
va_end(ap);
(void)fprintf(f, "\n");
@@ -1858,9 +1859,9 @@
{
va_list ap;
- va_start(ap, fmt);
(void)fflush(stdout);
(void)fprintf(stderr, "%s: ", progname);
+ va_start(ap, fmt);
(void)vfprintf(stderr, fmt, ap);
va_end(ap);
(void)fprintf(stderr, "\n");
diff -r d9a07be85d42 -r 6659b47df1d1 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Fri Jan 07 20:54:45 2022 +0000
+++ b/usr.bin/make/parse.c Fri Jan 07 21:00:49 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.632 2022/01/07 20:54:45 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.633 2022/01/07 21:00:49 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.632 2022/01/07 20:54:45 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.633 2022/01/07 21:00:49 rillig Exp $");
/*
* A file being read.
@@ -526,8 +526,8 @@
lineno = (size_t)curFile->readLines;
}
+ (void)fflush(stdout);
va_start(ap, fmt);
- (void)fflush(stdout);
ParseVErrorInternal(stderr, fname, lineno, type, fmt, ap);
va_end(ap);
@@ -1612,6 +1612,7 @@
*
* TODO: Add a test that demonstrates why this code is needed,
* apart from making the debug log longer.
+ *
* XXX: The variable name is expanded up to 3 times.
*/
if (!Var_ExistsExpand(scope, name))
Home |
Main Index |
Thread Index |
Old Index