Subject: Re: getdirentries(2): argument doesn't match
To: Andrew Brown <atatat@atatdot.net>
From: None <itojun@iijlab.net>
List: tech-kern
Date: 10/03/2002 14:22:32
>>	it seems that signedness of getdirentries(2) does not meet up with
>>	document.  does it make sense?  found by checking openbsd commit log.
>istm that by using a u_int instead of an int (they are both always the
>same size, right?) you can eliminate the two tests you have to add if
>you make it an int.
>less code to debug, audit, etc...

	in some portion system call argument type matches documentation (int),
	and checks are made using typecast to u_int (by typecasting negative
	number check is omitted).

	in some portion system call argument type differs from documentation
	(u_int), and checks are omitted for negative numbers.

	in some portion system call argument type matches documentation,
	and explicit checks are made - if (x < 0 || x >= MAX) return EINVAL;

	i want to see some consistency.

itojun