Hello, Dr. David Alan Gilbert, le lun. 08 avril 2019 09:46:53 +0100, a ecrit: > 'soread' has the comment: > > /* > * No need to check if there's enough room to read. > * soread wouldn't have been called if there weren't > */ > sopreprbuf(so, iov, &n); > > the compiler doesn't realise that, and is moaning about the case > where the if (len <=0) return happens and the following > code tries to use iov.
I see. Perhaps we should make this an assert then? In case this isn't true, i.e. soread() is called even if no room is available, returning 0 would probably just let the caller just try again, and we should rather just plainly crash than hang? Samuel