File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,10 @@ public enum Mach {
56
56
self . _name = name
57
57
58
58
if RightType . self == ReceiveRight . self {
59
- precondition ( name != 0xFFFFFFFF /* MACH_PORT_DEAD */,
60
- " Receive rights cannot be dead names " )
59
+ precondition (
60
+ _name != ( 0xFFFFFFFF as mach_port_name_t ) /* MACH_PORT_DEAD */,
61
+ " Receive rights cannot be dead names "
62
+ )
61
63
62
64
let secret = mach_port_context_t ( arc4random ( ) )
63
65
_machPrecondition ( mach_port_guard ( mach_task_self_, name, secret, 0 ) )
@@ -87,8 +89,10 @@ public enum Mach {
87
89
88
90
deinit {
89
91
if RightType . self == ReceiveRight . self {
90
- precondition ( _name != 0xFFFFFFFF /* MACH_PORT_DEAD */,
91
- " Receive rights cannot be dead names " )
92
+ precondition (
93
+ _name != ( 0xFFFFFFFF as mach_port_name_t ) /* MACH_PORT_DEAD */,
94
+ " Receive rights cannot be dead names "
95
+ )
92
96
_machPrecondition (
93
97
mach_port_destruct ( mach_task_self_, _name, 0 , _context)
94
98
)
You can’t perform that action at this time.
0 commit comments