diff options
Diffstat (limited to 'hurd/intr-msg.c')
-rw-r--r-- | hurd/intr-msg.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c index 0ca6af3580..e75fca81fb 100644 --- a/hurd/intr-msg.c +++ b/hurd/intr-msg.c @@ -1,6 +1,5 @@ /* Replacement for mach_msg used in interruptible Hurd RPCs. - Copyright (C) 1995,96,97,98,99,2000,2001,2002,2005 - Free Software Foundation, Inc. + Copyright (C) 1995,96,97,98,99,2000,01,02 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -202,10 +201,9 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg, case MACH_MSG_TYPE_MOVE_SEND: for (i = 0; i < number; i++) __mach_port_deallocate (__mach_task_self (), *ports++); - if (ty->msgtl_header.msgt_longform) - ty->msgtl_name = MACH_MSG_TYPE_COPY_SEND; - else - ty->msgtl_header.msgt_name = MACH_MSG_TYPE_COPY_SEND; + (ty->msgtl_header.msgt_longform + ? ty->msgtl_name : ty->msgtl_header.msgt_name) + = MACH_MSG_TYPE_COPY_SEND; break; case MACH_MSG_TYPE_COPY_SEND: case MACH_MSG_TYPE_MOVE_RECEIVE: @@ -225,29 +223,29 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg, name = ty->msgtl_name; size = ty->msgtl_size; number = ty->msgtl_number; - ty = (void *) ty + sizeof (mach_msg_type_long_t); + (char *) ty += sizeof (mach_msg_type_long_t); } else { name = ty->msgtl_header.msgt_name; size = ty->msgtl_header.msgt_size; number = ty->msgtl_header.msgt_number; - ty = (void *) ty + sizeof (mach_msg_type_t); + (char *) ty += sizeof (mach_msg_type_t); } if (ty->msgtl_header.msgt_inline) { clean_ports ((void *) ty, 0); /* calculate length of data in bytes, rounding up */ - ty = (void *) ty + (((((number * size) + 7) >> 3) - + sizeof (mach_msg_type_t) - 1) - &~ (sizeof (mach_msg_type_t) - 1)); + (char *) ty += (((((number * size) + 7) >> 3) + + sizeof (mach_msg_type_t) - 1) + &~ (sizeof (mach_msg_type_t) - 1)); } else { clean_ports (*(void **) ty, ty->msgtl_header.msgt_deallocate); - ty = (void *) ty + sizeof (void *); + ++(void **) ty; } } #else /* Untyped Mach IPC flavor. */ |