]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link, crypto/tls: don't use append loops
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 6 Feb 2017 11:03:58 +0000 (11:03 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 7 Feb 2017 16:42:32 +0000 (16:42 +0000)
Change-Id: Ib47e295e8646b769c30fd81e5c7f20f964df163e
Reviewed-on: https://go-review.googlesource.com/36335
Reviewed-by: Filippo Valsorda <hi@filippo.io>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/link/internal/ld/deadcode.go
src/crypto/tls/common.go

index ae516818f5a404ede12ac5f391f2a979b28ce7e6..5d19f407cc8e17a89430614ef0af52620abbb504 100644 (file)
@@ -254,9 +254,7 @@ func (d *deadcodepass) init() {
                                }
                        }
                }
-               for _, name := range markextra {
-                       names = append(names, name)
-               }
+               names = append(names, markextra...)
                for _, s := range dynexp {
                        d.mark(s, nil)
                }
index 2ebb37bd409800b76979fc986537184a1ed4639d..7e061f4d55a5c59176192ccfa84236522dcedf8e 100644 (file)
@@ -946,9 +946,7 @@ func initDefaultCipherSuites() {
        }
 
        varDefaultCipherSuites = make([]uint16, 0, len(cipherSuites))
-       for _, topCipher := range topCipherSuites {
-               varDefaultCipherSuites = append(varDefaultCipherSuites, topCipher)
-       }
+       varDefaultCipherSuites = append(varDefaultCipherSuites, topCipherSuites...)
 
 NextCipherSuite:
        for _, suite := range cipherSuites {