summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-11-29 00:28:38 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-11-29 10:13:51 +0100
commit6e0f722df45f6c261f250a8814458e19c2bed550 (patch)
treeafa2d758bfc22111525352d3ad42db3212f3e2f5 /ipc
parent1ca3a6d9aa0d287df4e375f8798536901474dabd (diff)
Use MACH_PORT_NAME_NULL and MACH_PORT_NAME_DEAD when checking for null or dead rights
Comparing mach_port_name_t that is MACH_PORT_NAME_DEAD against MACH_PORT_DEAD will always return false. Message-ID: <ZWbMBrk7qrl15sKL@jupiter.tail36e24.ts.net>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_space.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/ipc_space.h b/ipc/ipc_space.h
index 9b199de3..3f0eaa08 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)