Subject: Re: CVS commit: syssrc/sys/kern
To: Charles M. Hannum <abuse@spamalicious.com>
From: None <itojun@iijlab.net>
List: source-changes
Date: 10/03/2002 14:06:33
>> Modified Files:
>>         syssrc/sys/kern: kern_resource.c
>>
>> Log Message:
>> check negative arg.  from openbsd
>Due to the `(u_int)' cast -- which I added just about 5 years ago --
>this code already handled negative arguments correctly.  Your change
>is a noop.

	ok, but isn't it better to explicitly check
		if (which < 0 || which >= MAX)
			return EINVAL
	than
		if ((u_int)which >= MAX)
			return EINVAL
	from readability/clarity?

itojun