aboutsummaryrefslogtreecommitdiff
path: root/libc/inc/sys.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inc/sys.h')
-rw-r--r--libc/inc/sys.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/inc/sys.h b/libc/inc/sys.h
index 4a1d1e0..3145432 100644
--- a/libc/inc/sys.h
+++ b/libc/inc/sys.h
@@ -113,7 +113,7 @@ static inline struct message *msg_receive_loop()
static inline void *sread(const char *path)
{
struct stat s = { 0 };
- if (!stat(path, &s) || !s.size)
+ if (stat(path, &s) != 0 || !s.size)
return NULL;
void *buf = malloc(s.size);
read(path, buf, 0, s.size);