1
0
mirror of https://github.com/golang/go synced 2024-11-19 21:04:43 -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:
Brad Fitzpatrick 2011-05-02 23:08:27 -04:00 committed by Russ Cox
parent 8e340695c1
commit ec1ee024ad

View File

@ -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.