Browse Source

go.net/ipv4: make variable names clear

R=dave
CC=golang-dev
https://golang.org/cl/6632058
Mikio Hara 13 years ago
parent
commit
0892d67022
2 changed files with 6 additions and 6 deletions
  1. 2 2
      ipv4/helper_unix.go
  2. 4 4
      ipv4/helper_windows.go

+ 2 - 2
ipv4/helper_unix.go

@@ -39,8 +39,8 @@ func sysfd(c net.Conn) (int, error) {
 	cv := reflect.ValueOf(c)
 	switch ce := cv.Elem(); ce.Kind() {
 	case reflect.Struct:
-		nfd := ce.FieldByName("conn").FieldByName("fd")
-		switch fe := nfd.Elem(); fe.Kind() {
+		netfd := ce.FieldByName("conn").FieldByName("fd")
+		switch fe := netfd.Elem(); fe.Kind() {
 		case reflect.Struct:
 			fd := fe.FieldByName("sysfd")
 			return int(fd.Int()), nil

+ 4 - 4
ipv4/helper_windows.go

@@ -38,11 +38,11 @@ func sysfd(c net.Conn) (syscall.Handle, error) {
 	cv := reflect.ValueOf(c)
 	switch ce := cv.Elem(); ce.Kind() {
 	case reflect.Struct:
-		fd := ce.FieldByName("conn").FieldByName("fd")
-		switch fe := fd.Elem(); fe.Kind() {
+		netfd := ce.FieldByName("conn").FieldByName("fd")
+		switch fe := netfd.Elem(); fe.Kind() {
 		case reflect.Struct:
-			sysfd := fe.FieldByName("sysfd")
-			return syscall.Handle(sysfd.Uint()), nil
+			fd := fe.FieldByName("sysfd")
+			return syscall.Handle(fd.Uint()), nil
 		}
 	}
 	return syscall.InvalidHandle, errInvalidConnType