Module Name: src Committed By: rillig Date: Tue Dec 31 09:35:21 UTC 2024
Modified Files: src/usr.bin/make: var.c Log Message: make: reduce pointer indirections when unexporting a variable To generate a diff of this commit: cvs rdiff -u -r1.1141 -r1.1142 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.1141 src/usr.bin/make/var.c:1.1142 --- src/usr.bin/make/var.c:1.1141 Sat Nov 23 22:59:51 2024 +++ src/usr.bin/make/var.c Tue Dec 31 09:35:21 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.1141 2024/11/23 22:59:51 rillig Exp $ */ +/* $NetBSD: var.c,v 1.1142 2024/12/31 09:35:21 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -128,7 +128,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.1141 2024/11/23 22:59:51 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.1142 2024/12/31 09:35:21 rillig Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -962,7 +962,7 @@ UnexportVar(Substring varname, UnexportW } static void -UnexportVars(FStr *varnames, UnexportWhat what) +UnexportVars(const char *varnames, UnexportWhat what) { size_t i; SubstringWords words; @@ -970,7 +970,7 @@ UnexportVars(FStr *varnames, UnexportWha if (what == UNEXPORT_ENV) ClearEnv(); - words = Substring_Words(varnames->str, false); + words = Substring_Words(varnames, false); for (i = 0; i < words.len; i++) UnexportVar(words.words[i], what); SubstringWords_Free(words); @@ -987,7 +987,7 @@ Var_UnExport(bool isEnv, const char *arg FStr varnames; GetVarnamesToUnexport(isEnv, arg, &varnames, &what); - UnexportVars(&varnames, what); + UnexportVars(varnames.str, what); FStr_Done(&varnames); }