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: merge duplicate code
details: https://anonhg.NetBSD.org/src/rev/0f1ef4b68c03
branches: trunk
changeset: 371238:0f1ef4b68c03
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Oct 01 09:20:47 2022 +0000
description:
make: merge duplicate code
No functional change.
diffstat:
usr.bin/make/var.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (40 lines):
diff -r 253ad0eed77c -r 0f1ef4b68c03 usr.bin/make/var.c
--- a/usr.bin/make/var.c Sat Oct 01 08:55:45 2022 +0000
+++ b/usr.bin/make/var.c Sat Oct 01 09:20:47 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.1033 2022/09/27 17:46:58 rillig Exp $ */
+/* $NetBSD: var.c,v 1.1034 2022/10/01 09:20:47 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1033 2022/09/27 17:46:58 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1034 2022/10/01 09:20:47 rillig Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@@ -2926,11 +2926,8 @@
oneBigWord = ch->oneBigWord;
ParsePatternFlags(pp, &args.pflags, &oneBigWord);
- if (!ModChain_ShouldEval(ch)) {
- LazyBuf_Done(&replaceBuf);
- FStr_Done(&re);
- return AMR_OK;
- }
+ if (!ModChain_ShouldEval(ch))
+ goto done;
error = regcomp(&args.re, re.str, REG_EXTENDED);
if (error != 0) {
@@ -2947,6 +2944,7 @@
ModifyWords(ch, ModifyWord_SubstRegex, &args, oneBigWord);
regfree(&args.re);
+done:
LazyBuf_Done(&replaceBuf);
FStr_Done(&re);
return AMR_OK;
Home |
Main Index |
Thread Index |
Old Index