[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH gnumach] Use MACH_PORT_NAME_NULL and MACH_PORT_NAME_DEAD when che
From: |
Flavio Cruz |
Subject: |
[PATCH gnumach] Use MACH_PORT_NAME_NULL and MACH_PORT_NAME_DEAD when checking for null or dead rights |
Date: |
Wed, 29 Nov 2023 00:28:38 -0500 |
Comparing mach_port_name_t that is MACH_PORT_NAME_DEAD against
MACH_PORT_DEAD will always return false.
---
ipc/ipc_space.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/ipc_space.h b/ipc/ipc_space.h
index 9b199de..3f0eaa0 100644
--- a/ipc/ipc_space.h
+++ b/ipc/ipc_space.h
@@ -161,7 +161,7 @@ extern volatile boolean_t mach_port_deallocate_debug;
static inline void
ipc_entry_lookup_failed(mach_msg_header_t *msg, mach_port_name_t name)
{
- if (name == MACH_PORT_NULL || name == MACH_PORT_DEAD)
+ if (name == MACH_PORT_NAME_NULL || name == MACH_PORT_NAME_DEAD)
return;
printf("task %.*s looked up a bogus port %lu for %d, most probably a
bug.\n", (int) sizeof current_task()->name, current_task()->name, (unsigned
long) name, msg->msgh_id);
if (mach_port_deallocate_debug)
--
2.39.2
- [PATCH gnumach] Use MACH_PORT_NAME_NULL and MACH_PORT_NAME_DEAD when checking for null or dead rights,
Flavio Cruz <=