patch-2.4.2 linux/ipc/util.h

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

diff -u --recursive --new-file v2.4.1/linux/ipc/util.h linux/ipc/util.h
@@ -54,7 +54,7 @@
 {
 	struct kern_ipc_perm* out;
 	int lid = id % SEQ_MULTIPLIER;
-	if(lid > ids->size)
+	if(lid >= ids->size)
 		return NULL;
 
 	out = ids->entries[lid].p;
@@ -69,7 +69,7 @@
 {
 	struct kern_ipc_perm* out;
 	int lid = id % SEQ_MULTIPLIER;
-	if(lid > ids->size)
+	if(lid >= ids->size)
 		return NULL;
 
 	spin_lock(&ids->ary);

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