patch-2.3.30 linux/ipc/util.c

Next file: linux/ipc/util.h
Previous file: linux/ipc/shm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.29/linux/ipc/util.c linux/ipc/util.c
@@ -35,11 +35,12 @@
 {
 	int i;
 	sema_init(&ids->sem,1);
+
+	if(size > IPCMNI)
+		size = IPCMNI;
 	ids->size = size;
 	if(size == 0)
 		return;
-	if(size > IPCMNI)
-		size = IPCMNI;
 
 	ids->in_use = 0;
 	ids->max_id = -1;
@@ -59,9 +60,8 @@
 		ids->size = 0;
 	}
 	ids->ary = SPIN_LOCK_UNLOCKED;
-	for(i=0;i<size;i++) {
+	for(i=0;i<size;i++)
 		ids->entries[i].p = NULL;
-	}
 }
 
 int ipc_findkey(struct ipc_ids* ids, key_t key)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)