mirror of
https://github.com/golang/go
synced 2024-11-19 23:24:45 -07:00
os: remove race paranoia from Environ(); it's guarded now
R=rsc CC=golang-dev https://golang.org/cl/4426077
This commit is contained in:
parent
8e340695c1
commit
ec1ee024ad
@ -94,14 +94,10 @@ func Environ() []string {
|
||||
a := make([]string, len(env))
|
||||
i := 0
|
||||
for k, v := range env {
|
||||
// check i < len(a) for safety,
|
||||
// in case env is changing underfoot.
|
||||
if i < len(a) {
|
||||
a[i] = k + "=" + v
|
||||
i++
|
||||
}
|
||||
a[i] = k + "=" + v
|
||||
i++
|
||||
}
|
||||
return a[0:i]
|
||||
return a
|
||||
}
|
||||
|
||||
// TempDir returns the default directory to use for temporary files.
|
||||
|
Loading…
Reference in New Issue
Block a user