buffer_getv.c (282B)
1 /* ISC license. */ 2 3 #include <stddef.h> 4 5 #include <skalibs/allreadwrite.h> 6 #include <skalibs/buffer.h> 7 8 ssize_t buffer_getv (buffer *b, struct iovec const *v, unsigned int n) 9 { 10 size_t w = 0 ; 11 ssize_t r = unsanitize_read(buffer_getvall(b, v, n, &w)) ; 12 return r < 0 ? r : w ; 13 }