On success read() returns the number of bytes read or zero for EOF. On error -1 is returned and errno is set, so the right way to test if read had failed is to test the return value instead of errno. Signed-off-by: Alexander Dahl <ada@thorsis.com>lime2-spi
parent
8dc4e1fbf4
commit
3559028cb2
Loading…
Reference in new issue