about summary refs log tree commit diff
path: root/hurd/intr-msg.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-10-23 00:43:15 +0000
committerRoland McGrath <roland@gnu.org>2005-10-23 00:43:15 +0000
commit4e4c417b181ae21e3dcc80bce2819f3cebf2615a (patch)
treed2460e008c6d9e8691149466a3a241e68e84b762 /hurd/intr-msg.c
parent6738b11d46ef46407f454cb92780d1d973109d66 (diff)
downloadglibc-4e4c417b181ae21e3dcc80bce2819f3cebf2615a.tar.gz
glibc-4e4c417b181ae21e3dcc80bce2819f3cebf2615a.tar.xz
glibc-4e4c417b181ae21e3dcc80bce2819f3cebf2615a.zip
[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.
Diffstat (limited to 'hurd/intr-msg.c')
-rw-r--r--hurd/intr-msg.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c
index e75fca81fb..2c987ed3cd 100644
--- a/hurd/intr-msg.c
+++ b/hurd/intr-msg.c
@@ -201,9 +201,10 @@ _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++);
-		      (ty->msgtl_header.msgt_longform
-		       ? ty->msgtl_name : ty->msgtl_header.msgt_name)
-			= MACH_MSG_TYPE_COPY_SEND;
+		      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;
 		      break;
 		    case MACH_MSG_TYPE_COPY_SEND:
 		    case MACH_MSG_TYPE_MOVE_RECEIVE:
@@ -223,29 +224,29 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
 		  name = ty->msgtl_name;
 		  size = ty->msgtl_size;
 		  number = ty->msgtl_number;
-		  (char *) ty += sizeof (mach_msg_type_long_t);
+		  ty = (void *) 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;
-		  (char *) ty += sizeof (mach_msg_type_t);
+		  ty = (void *) 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 */
-		  (char *) ty += (((((number * size) + 7) >> 3)
-				   + sizeof (mach_msg_type_t) - 1)
-				  &~ (sizeof (mach_msg_type_t) - 1));
+		  ty = (void *) 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);
-		  ++(void **) ty;
+		  ty = (void *) ty + sizeof (void *);
 		}
 	    }
 #else  /* Untyped Mach IPC flavor. */