Here's my first patch for Mach; I hope it will get reviewed. There was 
a variable reply_port that was set in the if statement, but not used as 
an argument of ds_device_write_trap. I commented out the declaration 
(as there is indication in the comments that in the future it might be 
used in the call of ds_device_write_trap) and rewrote the if statement.
--- ./gnumach/kern/ipc_mig.c	2013-06-01 20:41:44.180548551 +0200
+++ ./gnumach1/kern/ipc_mig.c	2013-06-03 19:42:29.108955104 +0200
@@ -928,7 +928,7 @@
 			     vm_size_t		data_count)
 {
 	device_t	dev;
-	ipc_port_t	reply_port;
+	/*ipc_port_t	reply_port;*/
 	io_return_t	res;
 
 	/*
@@ -949,9 +949,10 @@
 	/*
 	 * Translate reply port.
 	 */
-	if (reply_name == MACH_PORT_NULL)
-		reply_port = IP_NULL;
-	else {
+	/*if (reply_name == MACH_PORT_NULL)
+	  reply_port = IP_NULL;
+	  else {*/
+	if (reply_name != MACH_PORT_NULL) {
 		/* Homey don't play that. */
 		device_deallocate(dev);
 		return KERN_INVALID_RIGHT;

Reply via email to