浏览代码

x/net/ipv4: fix build on older darwin kernels

A few adjustments for test cases will come in a following CL.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/179760044
Mikio Hara 11 年之前
父节点
当前提交
724ab9af50
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      ipv4/sys_darwin.go

+ 2 - 2
ipv4/sys_darwin.go

@@ -43,8 +43,8 @@ func init() {
 	}
 	var i int
 	for i = range osver {
-		if osver[i] != '.' {
-			continue
+		if osver[i] == '.' {
+			break
 		}
 	}
 	// The IP_PKTINFO and protocol-independent multicast API were