errno is never set to zero by any system call or library function, and it's programmer's resposibility to reset it before doing checks. Otherwise the error might be misleading. Signed-off-by: Syrone Wong <wong.syrone@gmail.com>