summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/hast_proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/hastd/hast_proto.c')
-rw-r--r--sbin/hastd/hast_proto.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/hastd/hast_proto.c b/sbin/hastd/hast_proto.c
index 439b0f3..039e767 100644
--- a/sbin/hastd/hast_proto.c
+++ b/sbin/hastd/hast_proto.c
@@ -114,13 +114,13 @@ hast_proto_send(const struct hast_resource *res, struct proto_conn *conn,
hdr.version = HAST_PROTO_VERSION;
hdr.size = htole32((uint32_t)ebuf_size(eb));
- if (ebuf_add_head(eb, &hdr, sizeof(hdr)) < 0)
+ if (ebuf_add_head(eb, &hdr, sizeof(hdr)) == -1)
goto end;
hptr = ebuf_data(eb, &hsize);
- if (proto_send(conn, hptr, hsize) < 0)
+ if (proto_send(conn, hptr, hsize) == -1)
goto end;
- if (data != NULL && proto_send(conn, dptr, size) < 0)
+ if (data != NULL && proto_send(conn, dptr, size) == -1)
goto end;
ret = 0;
@@ -141,7 +141,7 @@ hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp)
eb = NULL;
nv = NULL;
- if (proto_recv(conn, &hdr, sizeof(hdr)) < 0)
+ if (proto_recv(conn, &hdr, sizeof(hdr)) == -1)
goto fail;
if (hdr.version != HAST_PROTO_VERSION) {
@@ -154,11 +154,11 @@ hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp)
eb = ebuf_alloc(hdr.size);
if (eb == NULL)
goto fail;
- if (ebuf_add_tail(eb, NULL, hdr.size) < 0)
+ if (ebuf_add_tail(eb, NULL, hdr.size) == -1)
goto fail;
hptr = ebuf_data(eb, NULL);
PJDLOG_ASSERT(hptr != NULL);
- if (proto_recv(conn, hptr, hdr.size) < 0)
+ if (proto_recv(conn, hptr, hdr.size) == -1)
goto fail;
nv = nv_ntoh(eb);
if (nv == NULL)
@@ -196,7 +196,7 @@ hast_proto_recv_data(const struct hast_resource *res, struct proto_conn *conn,
} else if (dsize == 0) {
(void)nv_set_error(nv, 0);
} else {
- if (proto_recv(conn, data, dsize) < 0)
+ if (proto_recv(conn, data, dsize) == -1)
goto end;
for (ii = sizeof(pipeline) / sizeof(pipeline[0]); ii > 0;
ii--) {
OpenPOWER on IntegriCloud