Commit d8f5f2fe authored by Martin Blix Grydeland's avatar Martin Blix Grydeland Committed by Reza Naghibi

Allow a > 0 in VTCP_Check()

When used to check the result of read() and write() calls, it is useful
that a positive return value is accepted in VTCP_Check().
parent e8f20395
......@@ -560,6 +560,8 @@ VTCP_Check(ssize_t a)
{
if (a == 0)
return (1);
if (a > 0)
return (1);
if (errno == ECONNRESET || errno == ENOTCONN || errno == EPIPE)
return (1);
/* Accept EAGAIN (and EWOULDBLOCK in case they are not the same)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment