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(1): prefer direct jump over indirect varia...
details: https://anonhg.NetBSD.org/src/rev/827e28c7a314
branches: trunk
changeset: 936289:827e28c7a314
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Jul 24 08:22:05 2020 +0000
description:
make(1): prefer direct jump over indirect variable assignment
diffstat:
usr.bin/make/var.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (50 lines):
diff -r b6ee3482b8e7 -r 827e28c7a314 usr.bin/make/var.c
--- a/usr.bin/make/var.c Fri Jul 24 08:20:24 2020 +0000
+++ b/usr.bin/make/var.c Fri Jul 24 08:22:05 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.306 2020/07/24 08:20:24 rillig Exp $ */
+/* $NetBSD: var.c,v 1.307 2020/07/24 08:22:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.306 2020/07/24 08:20:24 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.307 2020/07/24 08:22:05 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.306 2020/07/24 08:20:24 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.307 2020/07/24 08:22:05 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -1393,11 +1393,10 @@
regmatch_t m[10];
if ((args->pflags & VARP_SUB_ONE) && (args->pflags & VARP_SUB_MATCHED))
- xrv = REG_NOMATCH;
- else {
- tryagain:
- xrv = regexec(&args->re, wp, args->nsub, m, flags);
- }
+ goto nosub;
+
+tryagain:
+ xrv = regexec(&args->re, wp, args->nsub, m, flags);
switch (xrv) {
case 0:
@@ -1456,6 +1455,7 @@
VarREError(xrv, &args->re, "Unexpected regex error");
/* fall through */
case REG_NOMATCH:
+ nosub:
SepBuf_AddBytes(buf, wp, strlen(wp));
break;
}
Home |
Main Index |
Thread Index |
Old Index