diff --git a/src/system/kernel/port.cpp b/src/system/kernel/port.cpp index e9dff1780b..26e00d26ed 100644 --- a/src/system/kernel/port.cpp +++ b/src/system/kernel/port.cpp @@ -1563,6 +1563,8 @@ writev_port_etc(port_id id, int32 msgCode, const iovec* msgVecs, if (bufferSize > PORT_MAX_MESSAGE_SIZE) return B_BAD_VALUE; + bool userCopy = (flags & PORT_FLAG_USE_USER_MEMCPY) != 0; + // mask irrelevant flags (for acquire_sem() usage) flags &= B_CAN_INTERRUPT | B_KILL_CAN_INTERRUPT | B_RELATIVE_TIMEOUT | B_ABSOLUTE_TIMEOUT; @@ -1574,8 +1576,6 @@ writev_port_etc(port_id id, int32 msgCode, const iovec* msgVecs, timeout += system_time(); } - bool userCopy = (flags & PORT_FLAG_USE_USER_MEMCPY) > 0; - status_t status; port_message* message = NULL;