Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PERFORCE change 90488 for review



http://perforce.freebsd.org/chv.cgi?CH=90488

Change 90488 by millert@millert_g4tower on 2006/01/27 15:28:16

	Style fixes

Affected files ...

.. //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/ipc/ipc_right.c#5 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/ipc/ipc_right.c#5 (text+ko) ====

@@ -1324,6 +1324,8 @@
 	ipc_entry_bits_t bits;
 #ifdef MAC
 	task_t self = current_task();
+	ipc_port_t port;
+	int rc;
 #endif
 
 	bits= entry->ie_bits;
@@ -1336,16 +1338,14 @@
 			return FALSE;
 
 #ifdef MAC
-		ipc_port_t port;
-
 		port = (ipc_port_t) entry->ie_object;
-		ip_lock (port);
-		tasklabel_lock (self);
-		int rc = mac_check_port_make_send (&self->maclabel, &port->ip_label);
-		tasklabel_unlock (self);
-		ip_unlock (port);
+		ip_lock(port);
+		tasklabel_lock(self);
+		rc = mac_check_port_make_send(&self->maclabel, &port->ip_label);
+		tasklabel_unlock(self);
+		ip_unlock(port);
 		if (rc)
-		  return FALSE;
+			return FALSE;
 #endif
 		break;
 
@@ -1355,13 +1355,13 @@
 
 #ifdef MAC
 		port = (ipc_port_t) entry->ie_object;
-		ip_lock (port);
-		tasklabel_lock (self);
-		rc = mac_check_port_move_receive (&self->maclabel, &port->ip_label);
-		tasklabel_unlock (self);
-		ip_unlock (port);
+		ip_lock(port);
+		tasklabel_lock(self);
+		rc = mac_check_port_move_receive(&self->maclabel, &port->ip_label);
+		tasklabel_unlock(self);
+		ip_unlock(port);
 		if (rc)
-		  return FALSE;
+			return FALSE;
 #endif
 		break;
 
@@ -1383,14 +1383,13 @@
 		ip_lock(port);
 		active = ip_active(port);
 #ifdef MAC
-		tasklabel_lock (self);
-		rc = mac_check_port_copy_send (&self->maclabel, &port->ip_label);
-		tasklabel_unlock (self);
-		if (rc)
-		  {
-		    ip_unlock (port);
-		    return FALSE;
-		  }
+		tasklabel_lock(self);
+		rc = mac_check_port_copy_send(&self->maclabel, &port->ip_label);
+		tasklabel_unlock(self);
+		if (rc) {
+			ip_unlock(port);
+			return FALSE;
+		}
 #endif
 		ip_unlock(port);
 
@@ -1476,14 +1475,13 @@
 		assert(port->ip_receiver == space);
 
 #ifdef MAC
-		tasklabel_lock (self);
-		rc = mac_check_port_make_send (&self->maclabel, &port->ip_label);
-		tasklabel_unlock (self);
-		if (rc)
-		  {
-		    ip_unlock (port);
-		    return KERN_NO_ACCESS;
-		  }
+		tasklabel_lock(self);
+		rc = mac_check_port_make_send(&self->maclabel, &port->ip_label);
+		tasklabel_unlock(self);
+		if (rc) {
+			ip_unlock(port);
+			return KERN_NO_ACCESS;
+		}
 #endif
 
 		port->ip_mscount++;
@@ -1511,14 +1509,13 @@
 		assert(port->ip_receiver == space);
 
 #ifdef MAC
-		tasklabel_lock (self);
-		rc = mac_check_port_make_send (&self->maclabel, &port->ip_label);
-		tasklabel_unlock (self);
-		if (rc)
-		  {
-		    ip_unlock (port);
-		    return KERN_NO_ACCESS;
-		  }
+		tasklabel_lock(self);
+		rc = mac_check_port_make_send(&self->maclabel, &port->ip_label);
+		tasklabel_unlock(self);
+		if (rc) {
+			ip_unlock(port);
+			return KERN_NO_ACCESS;
+		}
 #endif
 
 		port->ip_sorights++;
@@ -1546,14 +1543,14 @@
 		assert(port->ip_receiver == space);
 
 #ifdef MAC
-		tasklabel_lock (self);
-		rc = mac_check_port_move_receive (&self->maclabel, &port->ip_label);
-		tasklabel_unlock (self);
-		if (rc)
-		  {
-		    ip_unlock (port);
-		    return KERN_NO_ACCESS;
-		  }
+		tasklabel_lock(self);
+		rc = mac_check_port_move_receive(&self->maclabel,
+						 &port->ip_label);
+		tasklabel_unlock(self);
+		if (rc) {
+			ip_unlock(port);
+			return KERN_NO_ACCESS;
+		}
 #endif
 
 		if (bits & MACH_PORT_TYPE_SEND) {
@@ -1612,14 +1609,13 @@
 		  }
 
 #ifdef MAC
-		tasklabel_lock (self);
-		rc = mac_check_port_copy_send (&self->maclabel, &port->ip_label);
-		tasklabel_unlock (self);
-		if (rc)
-		  {
-		    ip_unlock (port);
-		    return KERN_NO_ACCESS;
-		  }
+		tasklabel_lock(self);
+		rc = mac_check_port_copy_send(&self->maclabel, &port->ip_label);
+		tasklabel_unlock(self);
+		if (rc) {
+			ip_unlock(port);
+			return KERN_NO_ACCESS;
+		}
 #endif
 
 		if ((bits & MACH_PORT_TYPE_SEND) == 0) {
@@ -1667,14 +1663,13 @@
 		}
 
 #ifdef MAC
-		tasklabel_lock (self);
-		rc = mac_check_port_copy_send (&self->maclabel, &port->ip_label);
-		tasklabel_unlock (self);
-		if (rc)
-		  {
-		    ip_unlock (port);
-		    return KERN_NO_ACCESS;
-		  }
+		tasklabel_lock(self);
+		rc = mac_check_port_copy_send(&self->maclabel, &port->ip_label);
+		tasklabel_unlock(self);
+		if (rc) {
+			ip_unlock(port);
+			return KERN_NO_ACCESS;
+		}
 #endif
 
 		if ((bits & MACH_PORT_TYPE_SEND) == 0) {
@@ -1746,14 +1741,13 @@
 		}
 
 #ifdef MAC
-		tasklabel_lock (self);
-		rc = mac_check_port_copy_send (&self->maclabel, &port->ip_label);
-		tasklabel_unlock (self);
-		if (rc)
-		  {
-		    ip_unlock (port);
-		    return KERN_NO_ACCESS;
-		  }
+		tasklabel_lock(self);
+		rc = mac_check_port_copy_send(&self->maclabel, &port->ip_label);
+		tasklabel_unlock(self);
+		if (rc) {
+			ip_unlock(port);
+			return KERN_NO_ACCESS;
+		}
 #endif
 
 		if ((bits & MACH_PORT_TYPE_SEND_ONCE) == 0) {
@@ -1952,14 +1946,13 @@
 	/* port is locked and active */
 
 #ifdef MAC
-	tasklabel_lock (self);
-	rc = mac_check_port_copy_send (&self->maclabel, &port->ip_label);
-	tasklabel_unlock (self);
-	if (rc)
-	  {
-	    ip_unlock (port);
-	    return KERN_NO_ACCESS;
-	  }
+	tasklabel_lock(self);
+	rc = mac_check_port_copy_send(&self->maclabel, &port->ip_label);
+	tasklabel_unlock(self);
+	if (rc) {
+		ip_unlock(port);
+		return KERN_NO_ACCESS;
+	}
 #endif
 
 	assert(port->ip_srights > 0);
@@ -2039,7 +2032,7 @@
 	ipc_entry_bits_t bits;
 	ipc_port_t port;
 #ifdef MAC
-	kern_return_t rc;
+	int rc;
 #endif
 
 	bits = entry->ie_bits;