mirror of git://sourceware.org/git/glibc.git
[BZ #1252]
2005-10-17 Thomas Schwinge <tschwinge@gnu.org> [BZ #1252] * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Don't use ?: as lvalue. * sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise.
This commit is contained in:
parent
6738b11d46
commit
4e4c417b18
|
|
@ -201,9 +201,10 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
|
||||||
case MACH_MSG_TYPE_MOVE_SEND:
|
case MACH_MSG_TYPE_MOVE_SEND:
|
||||||
for (i = 0; i < number; i++)
|
for (i = 0; i < number; i++)
|
||||||
__mach_port_deallocate (__mach_task_self (), *ports++);
|
__mach_port_deallocate (__mach_task_self (), *ports++);
|
||||||
(ty->msgtl_header.msgt_longform
|
if (ty->msgtl_header.msgt_longform)
|
||||||
? ty->msgtl_name : ty->msgtl_header.msgt_name)
|
ty->msgtl_name = MACH_MSG_TYPE_COPY_SEND;
|
||||||
= MACH_MSG_TYPE_COPY_SEND;
|
else
|
||||||
|
ty->msgtl_header.msgt_name = MACH_MSG_TYPE_COPY_SEND;
|
||||||
break;
|
break;
|
||||||
case MACH_MSG_TYPE_COPY_SEND:
|
case MACH_MSG_TYPE_COPY_SEND:
|
||||||
case MACH_MSG_TYPE_MOVE_RECEIVE:
|
case MACH_MSG_TYPE_MOVE_RECEIVE:
|
||||||
|
|
@ -223,29 +224,29 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
|
||||||
name = ty->msgtl_name;
|
name = ty->msgtl_name;
|
||||||
size = ty->msgtl_size;
|
size = ty->msgtl_size;
|
||||||
number = ty->msgtl_number;
|
number = ty->msgtl_number;
|
||||||
(char *) ty += sizeof (mach_msg_type_long_t);
|
ty = (void *) ty + sizeof (mach_msg_type_long_t);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
name = ty->msgtl_header.msgt_name;
|
name = ty->msgtl_header.msgt_name;
|
||||||
size = ty->msgtl_header.msgt_size;
|
size = ty->msgtl_header.msgt_size;
|
||||||
number = ty->msgtl_header.msgt_number;
|
number = ty->msgtl_header.msgt_number;
|
||||||
(char *) ty += sizeof (mach_msg_type_t);
|
ty = (void *) ty + sizeof (mach_msg_type_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ty->msgtl_header.msgt_inline)
|
if (ty->msgtl_header.msgt_inline)
|
||||||
{
|
{
|
||||||
clean_ports ((void *) ty, 0);
|
clean_ports ((void *) ty, 0);
|
||||||
/* calculate length of data in bytes, rounding up */
|
/* calculate length of data in bytes, rounding up */
|
||||||
(char *) ty += (((((number * size) + 7) >> 3)
|
ty = (void *) ty + (((((number * size) + 7) >> 3)
|
||||||
+ sizeof (mach_msg_type_t) - 1)
|
+ sizeof (mach_msg_type_t) - 1)
|
||||||
&~ (sizeof (mach_msg_type_t) - 1));
|
&~ (sizeof (mach_msg_type_t) - 1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
clean_ports (*(void **) ty,
|
clean_ports (*(void **) ty,
|
||||||
ty->msgtl_header.msgt_deallocate);
|
ty->msgtl_header.msgt_deallocate);
|
||||||
++(void **) ty;
|
ty = (void *) ty + sizeof (void *);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else /* Untyped Mach IPC flavor. */
|
#else /* Untyped Mach IPC flavor. */
|
||||||
|
|
|
||||||
|
|
@ -136,9 +136,11 @@ __ioctl (int fd, unsigned long int request, ...)
|
||||||
Rather than pointing to the value, ARG is the value itself. */
|
Rather than pointing to the value, ARG is the value itself. */
|
||||||
#ifdef MACH_MSG_TYPE_BIT
|
#ifdef MACH_MSG_TYPE_BIT
|
||||||
*t++ = io2mach_type (1, _IOTS (integer_t));
|
*t++ = io2mach_type (1, _IOTS (integer_t));
|
||||||
*((integer_t *) t)++ = (integer_t) arg;
|
*(integer_t *) t = (integer_t) arg;
|
||||||
|
t = (void *) t + sizeof (integer_t);
|
||||||
#else
|
#else
|
||||||
*((integer_t *) p)++ = (integer_t) arg;
|
*(integer_t *) p = (integer_t) arg;
|
||||||
|
p = (void *) p + sizeof (integer_t);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue