[ovs-dev] [PATCH] jsonrpc: Comment possible return values from jsonrpc_get_status().

Ben Pfaff blp at nicira.com
Mon Jan 31 01:51:28 UTC 2011


On Sun, Jan 30, 2011 at 4:45 PM, Andrew Evans <aevans at nicira.com> wrote:
> On 1/30/11 1:31 PM, Ben Pfaff wrote:
>> On Sun, Jan 30, 2011 at 12:01 PM, Andrew Evans <aevans at nicira.com> wrote:
>>> +/*
>>> + * Possible status values:
>>> + * - 0: no error yet
>>> + * - EOF (-1): end of file (remote end closed connection; not necessarily
>>> + *                          an error)
>>> + */
>>
>> What about positive values?  (They are errno values).
>
> It's in my tree. I must have put it in after sending the patch.
>
>> EOF isn't necessarily -1 so it's better to leave that out.
>
> Erm, I thought you said it was. Ok, removed.

I hope that you just realized that I was referring to the (-1) in the comment
here.  At any rate EOF isn't guaranteed to be -1, see:
        http://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdio.h.html
which just says that EOF is "a negative integer constant expression"




More information about the dev mailing list