summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/proto_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/hastd/proto_common.c')
-rw-r--r--sbin/hastd/proto_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/hastd/proto_common.c b/sbin/hastd/proto_common.c
index 183b4e4..59b1e39 100644
--- a/sbin/hastd/proto_common.c
+++ b/sbin/hastd/proto_common.c
@@ -116,7 +116,7 @@ proto_common_send(int sock, const unsigned char *data, size_t size, int fd)
done = send(sock, data, sendsize, MSG_NOSIGNAL);
if (done == 0) {
return (ENOTCONN);
- } else if (done < 0) {
+ } else if (done == -1) {
if (errno == EINTR)
continue;
if (errno == ENOBUFS) {
@@ -215,7 +215,7 @@ proto_common_recv(int sock, unsigned char *data, size_t size, int *fdp)
} while (done == -1 && errno == EINTR);
if (done == 0) {
return (ENOTCONN);
- } else if (done < 0) {
+ } else if (done == -1) {
/*
* If this is blocking socket and we got EAGAIN, this
* means the request timed out. Translate errno to
OpenPOWER on IntegriCloud