[PATCH 08/12] conn_linux: move comment to make its meaning more obvious

Simon Ruderich simon at ruderich.org
Mon Jan 1 11:52:58 CET 2018


At first I didn't understand the connection between errno == 0 and
"error instance", putting it immediately before the nil should help.
---
 src/conn_linux.go | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/conn_linux.go b/src/conn_linux.go
index 63ad2ec..571c882 100644
--- a/src/conn_linux.go
+++ b/src/conn_linux.go
@@ -477,9 +477,8 @@ func send4(sock int, end *NativeEndpoint, buff []byte) error {
 		)
 	}
 
-	// errno = 0 is still an error instance
-
 	if errno == 0 {
+		// errno = 0 is still an error instance
 		return nil
 	}
 
-- 
2.15.1



More information about the WireGuard mailing list