On Fri, Feb 12, 2010 at 08:44:25AM +0000, Jason McIntyre wrote: > On Fri, Feb 12, 2010 at 11:27:35AM +0300, Vadim Zhukov wrote: > > > > > > > > Maybe it's better to say that this is not treated as error too? See > > > > the patch at the end of this letter. > > > > > > i don;t know this stuff. but why would you expect an error in this > > > case? if we are saying that if len is 0, then this happens, why do > > > we need to say it doesn;t generate an error? > > > > For example, another memory management function manual page, malloc(3), > > explicitly specifies that it's not an error to specify zero in "size" > > parameter. > > > > can you quote me the bit of text? i cannot immediately see it. > > > Such declaration make saves time from test compilation that proves "it's > > not an error". I think this is job for manual - avoiding such testing. > > > > my point is that if we say that if len is 0 then no action is taken, it > is implicit that it is not an error to do so. so again i'm asking, is it > important to do so? could someone reading that page really think well, > no action is taken, but will it cause an error?
I am with jmc here. saying that no action is taken does imply that it is not an error. -0- diff follows: Index: sys/mprotect.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/mprotect.2,v retrieving revision 1.14 diff -u -p -r1.14 mprotect.2 --- sys/mprotect.2 31 May 2007 19:19:33 -0000 1.14 +++ sys/mprotect.2 12 Feb 2010 14:00:46 -0000 @@ -55,7 +55,7 @@ through (inclusive). If .Fa len -is 0, then action will be taken on the page that contains +is 0, then no action will be taken on the page that contains .Fa addr . .Pp Not all implementations will guarantee protection on a page basis; ksh: cd: /usr/src/sys/lib/libc - No such file or directory