From: David Crawshaw Date: Mon, 2 Mar 2015 09:14:49 +0000 (-0500) Subject: runtime: remove unused getenv function X-Git-Tag: go1.5beta1~1770 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=dac3f486ac0be26fdbc0cf08d1cfecc43b4c2c53;p=gostls13.git runtime: remove unused getenv function Change-Id: I49cda99f81b754e25fad1483de373f7d07d64808 Reviewed-on: https://go-review.googlesource.com/6452 Reviewed-by: Keith Randall Run-TryBot: Brad Fitzpatrick --- diff --git a/src/runtime/env_plan9.go b/src/runtime/env_plan9.go index ec50cac484..b988020d9c 100644 --- a/src/runtime/env_plan9.go +++ b/src/runtime/env_plan9.go @@ -6,15 +6,6 @@ package runtime import "unsafe" -func getenv(s *byte) *byte { - val := gogetenv(gostringnocopy(s)) - if val == "" { - return nil - } - // Strings found in environment are NUL-terminated. - return &bytes(val)[0] -} - var tracebackbuf [128]byte func gogetenv(key string) string { diff --git a/src/runtime/env_posix.go b/src/runtime/env_posix.go index b6567d39f4..5e49287421 100644 --- a/src/runtime/env_posix.go +++ b/src/runtime/env_posix.go @@ -8,15 +8,6 @@ package runtime import "unsafe" -func getenv(s *byte) *byte { - val := gogetenv(gostringnocopy(s)) - if val == "" { - return nil - } - // Strings found in environment are NUL-terminated. - return &bytes(val)[0] -} - func gogetenv(key string) string { env := environ() if env == nil {