Am Wed, 2 Jun 2021 12:57:10 +0200
schrieb Olaf Hering <[email protected]>:

> > This will stop the loop, even if idx hasn't reached iovcnt.  
> 
> Yes, it will trigger yet another readv().
> 
> The "while" might be a leftover from a variant which used repeated read_exact 
> to finish the function. It should become a "if", and the "len = 0" can be 
> removed.

I think the code is correct.

The while() loop checks if the last iov had a short read, and finishes that iov 
with read_exact.

I will add a comment, if that helps.

Olaf

Attachment: pgp11hrrswC83.pgp
Description: Digitale Signatur von OpenPGP

Reply via email to