The code was working because EOF is usually -1, but that's not guaranteed by any standard. It's also conceptually wrong to mix this definition from stream based I/O on file dscriptor based I/O. For the close() call, just check that the return value is not 0. Regression introduced in f4f4a1aa8dec678b6f34abcbcb8efd5b75966028.
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||