From 4724a17eb69aaa46887738f841ccadaf89a1b5e6 Mon Sep 17 00:00:00 2001 From: rillig Date: Mon, 13 Dec 2021 03:03:42 +0000 Subject: [PATCH] make: in the modifier ':C', don't call strlen unnecessarily No functional change. --- usr.bin/make/var.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index b18020344852..04836880941f 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.981 2021/12/13 02:57:44 rillig Exp $ */ +/* $NetBSD: var.c,v 1.982 2021/12/13 03:03:42 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -140,7 +140,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.981 2021/12/13 02:57:44 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.982 2021/12/13 03:03:42 rillig Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -1692,7 +1692,7 @@ again: if (xrv != REG_NOMATCH) VarREError(xrv, &args->re, "Unexpected regex error"); no_match: - SepBuf_AddStr(buf, wp); + SepBuf_AddBytesBetween(buf, wp, word.end); return; ok: