On Fri, Apr 24, 2026 at 09:28 +0800, Kevin J. McCarthy wrote:

 if (res < length_requested)
 {
   length_requested -= res;
   random_bytes += res;
 }

I hope that code is not executed if the return value is -1.

Yup. That's exactly what I meant by making the code clearer. If res is type size_t, then it can't be -1 in that comparison.

I'm asking: is that code executed when the return value is -1? If not, then we don't have to care whether it works in that error case.

Reply via email to