git: 8725f0b9dbd2 - main - Revert "getty: push assignment to inner block."

Xin LI delphij at FreeBSD.org
Sun May 9 16:06:19 UTC 2021


The branch main has been updated by delphij:

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

commit 8725f0b9dbd296ca93f0f19c51940a46a98dcb2d
Author:     Xin LI <delphij at FreeBSD.org>
AuthorDate: 2021-05-09 16:05:52 +0000
Commit:     Xin LI <delphij at FreeBSD.org>
CommitDate: 2021-05-09 16:05:52 +0000

    Revert "getty: push assignment to inner block."
    
    This reverts commit c7b8bc367f18210d233b0e2185b5ce0d55c9ccaa.
    
    Pointed out by: trasz
---
 libexec/getty/subr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c
index b8f359355afc..9958d193aa60 100644
--- a/libexec/getty/subr.c
+++ b/libexec/getty/subr.c
@@ -564,8 +564,8 @@ makeenv(char *env[])
 		strlcat(termbuf, TT, sizeof(termbuf));
 		*ep++ = termbuf;
 	}
-	if (EV) {
-		p = EV;
+	if ((p = EV)) {
+		q = p;
 		while ((q = strchr(q, ','))) {
 			*q++ = '\0';
 			*ep++ = p;


More information about the dev-commits-src-all mailing list