Minor format changes and adding of additional comments.

This commit is contained in:
Bill Abt
2019-08-27 10:18:21 -04:00
parent 9e6e6da3c2
commit 49cab699e9
+2 -1
View File
@@ -690,9 +690,10 @@ public class Socket: SocketReader, SocketWriter {
var memLoc = 0
// macOS uses one byte for sa_family_t, Linux uses two...
// Note: on Linux, account for endianess...
#if os(Linux)
let afUnixShort = UInt16(AF_UNIX)
if isLittleEndian {
if isLittleEndian {
addrPtr[memLoc] = UInt8(afUnixShort & 0xFF)
memLoc += 1
addrPtr[memLoc] = UInt8((afUnixShort >> 8) & 0xFF)