On 13.03.2012 22:01, Paolo Bonzini wrote: >>> ssize_t qemu_sendv_recvv(int sockfd, struct iovec *iov, >>> size_t offset, size_t bytes, bool do_sendv);
> Hmm, since you are at it however, perhaps you could add an argument to > these functions and qemu_sendv_recvv for the length of the iovec, so > that it can detect out-of-bounds access. Yes such an argument may be needed here, and this function looks differently from the usual iov_* family in this very place: lack of iov_cnt. > This would also "fix" the fact > that you changed the signature of the function in a compatible way, > while making the API incompatible. As you prefer, but we can call it a > deal for the #defines. ;) Heh for the #defines. Defines are fine when used properly, really. In this case, the #define just adds an argument and nothing more. For qemu_sendv and qemu_recvv, I'll just go for renaming these to be iov_send and iov_recv, and move them to iov.[ch]. And for qemu_co_sendv()&Co, which actually _are_ used, this wont help anyway. Or I can rename them to qemu_iovec_co_send(), to catch the change. But it becomes longer... :( What do you think? Thank you! /mjt