Skip to content

Commit

Permalink
net, internal/poll: reset value before adding in minor kernel version
Browse files Browse the repository at this point in the history
Fixes #42733

Change-Id: I5446aeb5de13cd70212755fb12c9bc484f343c74
Reviewed-on: https://go-review.googlesource.com/c/go/+/271846
Trust: Ian Lance Taylor <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Cuong Manh Le <[email protected]>
TryBot-Result: Go Bot <[email protected]>
  • Loading branch information
ianlancetaylor committed Nov 20, 2020
1 parent 0dcc7d6 commit 66c0264
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/internal/poll/copy_file_range_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func kernelVersion() (major int, minor int) {
if vi >= len(values) {
break
}
value = 0
}
}
switch vi {
Expand Down
1 change: 1 addition & 0 deletions src/net/sock_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func kernelVersion() (major int, minor int) {
if vi >= len(values) {
break
}
value = 0
}
}
switch vi {
Expand Down

0 comments on commit 66c0264

Please sign in to comment.