Skip to content

Commit

Permalink
syscall: remove a wrong comment in Clearenv
Browse files Browse the repository at this point in the history
The comment being removed was added by commit ff31738
(which predates Gerrit and Rietveld, so no CL link), and
at the time it made sense.

Since CL 148370043 (and up to the current implementation of Clearenv)
the env map, which is populated by copyenv, is actually used, so the
comment is no longer valid.

It is also misleading, so it's best to remove it.

Change-Id: I8bd2e8bca6262759538e5bcbd396f0c71cca6a4c
Reviewed-on: https://go-review.googlesource.com/c/go/+/635078
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
  • Loading branch information
kolyshkin authored and gopherbot committed Dec 11, 2024
1 parent a9922d0 commit e0c76d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/syscall/env_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func Setenv(key, value string) error {
}

func Clearenv() {
envOnce.Do(copyenv) // prevent copyenv in Getenv/Setenv
envOnce.Do(copyenv)

envLock.Lock()
defer envLock.Unlock()
Expand Down

0 comments on commit e0c76d9

Please sign in to comment.