Merge pull request #62085 from seans3/atomic-fix

Automatic merge from submit-queue (batch tested with PRs 62049, 62085). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixes incorrect atomic usage

Fixes incorrect assignment for atomic increment.
NOTE: This will be a vet error in go version 1.10.
ERROR: "direct assignment to atomic value".
No other erroneous atomic assignments found.

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-04-03 20:25:04 -07:00 committed by GitHub
commit 5c59de28b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -399,7 +399,7 @@ func TestRoundTripRedirects(t *testing.T) {
var redirects int32 = 0
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
if redirects < test.redirects {
redirects = atomic.AddInt32(&redirects, 1)
atomic.AddInt32(&redirects, 1)
http.Redirect(w, req, "redirect", http.StatusFound)
return
}