Explicitly use an unsigned index for 'which' in shmsys(), msgsys(), and
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 3 Aug 2003 17:11:36 +0000 (17:11 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 3 Aug 2003 17:11:36 +0000 (17:11 +0000)
commit180508ff7dce46795d67c6588f17e4171cb33ebd
tree6446d6a60ff64bef58475f589e6444c1a9450be5
parentde347b311fb2ac8a5e51a1d831d48da1ce473eff
Explicitly use an unsigned index for 'which' in shmsys(), msgsys(), and
semsys(), so the implications of the use of a negative index become obvious.
Fix the misdocumented 'which' UAP argument, which is actually signed.

Note: There is no security issue because sizeof() is unsigned but such
non-explicit comparisons are a very dangerous way to code and this fixes
that.
sys/kern/sysv_msg.c
sys/kern/sysv_sem.c
sys/kern/sysv_shm.c