summaryrefslogtreecommitdiff
path: root/libhw_cr/host_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhw_cr/host_net.c')
-rw-r--r--libhw_cr/host_net.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libhw_cr/host_net.c b/libhw_cr/host_net.c
index 01f4370..d162504 100644
--- a/libhw_cr/host_net.c
+++ b/libhw_cr/host_net.c
@@ -241,6 +241,10 @@ static ssize_t hostnet_tcp_readv(struct _hostnet_tcp_conn *conn, const struct io
assert(conn);
assert(iov);
assert(iovcnt > 0);
+ size_t count = 0;
+ for (int i = 0; i < iovcnt; i++)
+ count += iov[i].iov_len;
+ assert(count);
ssize_t ret;
struct hostnet_pthread_readv_args args = {
@@ -319,6 +323,10 @@ static ssize_t hostnet_tcp_writev(struct _hostnet_tcp_conn *conn, const struct i
assert(conn);
assert(iov);
assert(iovcnt > 0);
+ size_t count = 0;
+ for (int i = 0; i < iovcnt; i++)
+ count += iov[i].iov_len;
+ assert(count);
ssize_t ret;
struct hostnet_pthread_writev_args args = {