[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] evbuffer_write with empty buffer



On Tue, Mar 31, 2015 at 02:06:42PM +0200, Maciej Szeptuch wrote:
> Hi,
> 
> I have a question about evbuffer_write.
> I couldn't find it anywhere, but am I required to check if buffer is
> not empty before calling evbuffer_write or it returning -1 (and not
> setting errno!) in this situation is a bug?

AFAICS it must return -1.

But it also could return -1, if write(2) will fail, but in this case you
will have errno installed.

Cheers,
Azat.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.