Commit d3a1ea6a authored by Mikio Hara's avatar Mikio Hara

go.net/ipv6: make use of range

R=dave
CC=golang-dev
https://golang.org/cl/10019048
parent cdfc4ce1
...@@ -21,7 +21,7 @@ func (f *rawICMPFilter) set(typ ICMPType, block bool) { ...@@ -21,7 +21,7 @@ func (f *rawICMPFilter) set(typ ICMPType, block bool) {
} }
func (f *rawICMPFilter) setAll(block bool) { func (f *rawICMPFilter) setAll(block bool) {
for i := 0; i < len(f.Filt); i++ { for i := range f.Filt {
if block { if block {
f.Filt[i] = 0 f.Filt[i] = 0
} else { } else {
......
...@@ -19,7 +19,7 @@ func (f *rawICMPFilter) set(typ ICMPType, block bool) { ...@@ -19,7 +19,7 @@ func (f *rawICMPFilter) set(typ ICMPType, block bool) {
} }
func (f *rawICMPFilter) setAll(block bool) { func (f *rawICMPFilter) setAll(block bool) {
for i := 0; i < len(f.Data); i++ { for i := range f.Data {
if block { if block {
f.Data[i] = 1<<32 - 1 f.Data[i] = 1<<32 - 1
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment