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): condense code in Var_Subst
details: https://anonhg.NetBSD.org/src/rev/f62947eb9b62
branches: trunk
changeset: 944191:f62947eb9b62
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Sep 22 20:23:57 2020 +0000
description:
make(1): condense code in Var_Subst
diffstat:
usr.bin/make/var.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diffs (32 lines):
diff -r 5a333a941783 -r f62947eb9b62 usr.bin/make/var.c
--- a/usr.bin/make/var.c Tue Sep 22 20:19:46 2020 +0000
+++ b/usr.bin/make/var.c Tue Sep 22 20:23:57 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.533 2020/09/22 20:19:46 rillig Exp $ */
+/* $NetBSD: var.c,v 1.534 2020/09/22 20:23:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -121,7 +121,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.533 2020/09/22 20:19:46 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.534 2020/09/22 20:23:57 rillig Exp $");
#define VAR_DEBUG_IF(cond, fmt, ...) \
if (!(DEBUG(VAR) && (cond))) \
@@ -3793,12 +3793,8 @@
str++;
}
} else {
- size_t val_len;
-
str = nested_str;
-
- val_len = strlen(val);
- Buf_AddBytes(&buf, val, val_len);
+ Buf_AddStr(&buf, val);
}
free(freeIt);
freeIt = NULL;
Home |
Main Index |
Thread Index |
Old Index