]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: remove an unused variable in readCookies function
authorJoe Kyo <xunianzu@gmail.com>
Mon, 31 Jul 2017 09:30:16 +0000 (10:30 +0100)
committerJoe Tsai <thebrokentoaster@gmail.com>
Thu, 10 Aug 2017 17:52:50 +0000 (17:52 +0000)
Change-Id: I9d77655026f16a41a77bd0036d693a40cdd6d52f
Reviewed-on: https://go-review.googlesource.com/52090
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/net/http/cookie.go

index cf522488c15d68470ac13f715c42c1e041066e80..38b1b3630e291de3fb2749795eb72ff2765e94a7 100644 (file)
@@ -208,7 +208,6 @@ func readCookies(h Header, filter string) []*Cookie {
                        continue
                }
                // Per-line attributes
-               parsedPairs := 0
                for i := 0; i < len(parts); i++ {
                        parts[i] = strings.TrimSpace(parts[i])
                        if len(parts[i]) == 0 {
@@ -229,7 +228,6 @@ func readCookies(h Header, filter string) []*Cookie {
                                continue
                        }
                        cookies = append(cookies, &Cookie{Name: name, Value: val})
-                       parsedPairs++
                }
        }
        return cookies