Greg Steuck <gne...@openbsd.org> wrote:
> Thanks for the patch.
> 
> I could see some value in tightening the conditions to always check
> `!= expected`. I don't see enough improvement from separating the error
> case of -1 from the incomplete read case considering the otherwise
> identical behavior.

I'll refer to https://marc.info/?l=openbsd-tech&m=169120238326202&w=2 :

> What errno is being printed here?

So then it becomes a matter of wanting to signal the user that something
went wrong other than a short read.

Will it be fine to fold into `!= expected` and warning that an
incomplete {ELF,program} header was encountered (the warnx)?

-Lucas

Reply via email to