lib

morphux C utility library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/lib

commit 5de16ecefa802b8dade488d2ee8e7b12f1b6848e
parent 3163d0b7005ced0479eb528e34a4a7428e428bf7
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Wed, 17 May 2017 18:18:27 +0200

Fix(Utils): Fix a bad handled return value

Diffstat:
Minc/m_util.h | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/inc/m_util.h b/inc/m_util.h @@ -45,7 +45,8 @@ static inline bool file_exist(const char *str) { int fd = open(str, O_RDONLY); bool result = (fd != -1); - close(fd); + if (result == true) + close(fd); return result; }