summaryrefslogtreecommitdiff
path: root/src/libstddjb/iobuffer_kfromu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/iobuffer_kfromu.c')
-rw-r--r--src/libstddjb/iobuffer_kfromu.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libstddjb/iobuffer_kfromu.c b/src/libstddjb/iobuffer_kfromu.c
index 7f2feda..7942541 100644
--- a/src/libstddjb/iobuffer_kfromu.c
+++ b/src/libstddjb/iobuffer_kfromu.c
@@ -13,15 +13,13 @@
int iobuffer_kfromu (iobufferk *k, iobufferu *u)
{
- struct iovec iov[2] ;
- siovec_t v[2] ;
- int r ;
+ struct iovec v[2] ;
+ ssize_t r ;
buffer_rpeek(&u->b[0], v) ;
- iovec_from_siovec(iov, v, 2) ;
- r = vmsplice(k->p[1], iov, 2, 0) ;
+ r = vmsplice(k->p[1], v, 2, 0) ;
if (r < 0) return 0 ;
k->n += r ;
- buffer_rseek(&u->b[0], (unsigned int)r) ;
+ buffer_rseek(&u->b[0], r) ;
u->b[1].c.p = u->b[0].c.p ;
return iobufferu_isempty(u) ;
}