]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unused getenv function
authorDavid Crawshaw <crawshaw@golang.org>
Mon, 2 Mar 2015 09:14:49 +0000 (04:14 -0500)
committerDavid Crawshaw <crawshaw@golang.org>
Mon, 2 Mar 2015 19:19:25 +0000 (19:19 +0000)
Change-Id: I49cda99f81b754e25fad1483de373f7d07d64808
Reviewed-on: https://go-review.googlesource.com/6452
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

src/runtime/env_plan9.go
src/runtime/env_posix.go

index ec50cac484a61d12a488a51310f0006a18a99eb9..b988020d9c7f42f28356c8dbb0115eeae92cd290 100644 (file)
@@ -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 {
index b6567d39f4276daf0e2dca32c4870db1435a6355..5e49287421a637aaf812af5f299c83c30568537c 100644 (file)
@@ -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 {