"Theo de Raadt" <dera...@openbsd.org> wrote: > Nope, that is not correct. > > errno is not being cleared. It just happens to be zero. Future > code changes could insert another operation above which would set > errno, and then this would print a report about that error.
Although I was being sarcastic with """Everything is alright""", yes, correct. Point taken. > No, your diff is still wrong. > > errno is only updated when a system call returns -1. > > So your diff is looking at an old, unrelated, errno. How? This is now correctly looking at errno only when {,p}read returns -1, and is using warnx in the other cases.