Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jul 2021 17:12:54 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: ffc35739bac4 - stable/12 - Another partial revert of r301289.
Message-ID:  <202107101712.16AHCsAE088375@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=ffc35739bac49abe823182f61e36162d25e06fe4

commit ffc35739bac49abe823182f61e36162d25e06fe4
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2019-06-03 05:25:22 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2021-07-10 17:11:15 +0000

    Another partial revert of r301289.
    
    In this case, a change was made in one-true-awk from *FS to
    getsval(fsloc) in a line just after one of the lines that had the 0 ->
    NULL change. It works both ways as far as I can tell.  It looks like a
    bug fix, but I've not tried to track down which ancient version of
    one-true-awk it was in (github starts too late for tracking this
    down). Before and after the changes the regression suite is passes
    100% relative to the un-modified one-true-awk.
    
    (cherry picked from commit d9e8cf281b12ca943d150b29ae5a847b0df888f3)
---
 contrib/one-true-awk/run.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c
index 1859263f7f4b..baea06ed2500 100644
--- a/contrib/one-true-awk/run.c
+++ b/contrib/one-true-awk/run.c
@@ -1267,7 +1267,7 @@ Cell *split(Node **a, int nnn)	/* split(a[0], a[1], a[2]); a[3] is type */
 	origs = s = strdup(getsval(y));
 	arg3type = ptoi(a[3]);
 	if (a[2] == NULL)		/* fs string */
-		fs = *FS;
+		fs = getsval(fsloc);
 	else if (arg3type == STRING) {	/* split(str,arr,"string") */
 		x = execute(a[2]);
 		origfs = fs = strdup(getsval(x));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107101712.16AHCsAE088375>