Edgar Pettijohn <ed...@pettijohn-web.com> wrote:

> slight wording change. it doesn't return these values it sets errno to
> these values...

 .Fn recv
 and
 .Fn recvfrom
-may return the following error:
+may fail if:
 .Bl -tag -width Er
 .It Bq Er EINVAL
 .Fa len

I think it is more accurate the way it is, rather than coping the "will
fail if" or "may fail if" wording from other pages.

I've been unhappy about this style in other pages for quite a while.
They say:

    ERRORS
        The open() and openat() functions will fail if:

This type of wording describing the situation backwards.  The functions
do not fail if they return an error code.  Rather, they return an error
code to indicate they failed.

It is the same with recv.  recv doesn't return an error, and then "may
fail".  Rather, it has failed to perform the operation, and that is why
it returned the error.

This is horse before cart stuff.

  • recv.2 patch Edgar Pettijohn
    • Re: recv.2 patch Theo de Raadt

Reply via email to