From 8b4481da9f907ccf87f1e04ac281117e99bbb49f Mon Sep 17 00:00:00 2001
From: Philippe PITTOLI
Date: Wed, 14 Sep 2016 00:27:50 +0200
Subject: [PATCH] communication: if read == 0 => it's ok
---
lib/communication.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/communication.c b/lib/communication.c
index 4f55737..f9620c9 100644
--- a/lib/communication.c
+++ b/lib/communication.c
@@ -59,7 +59,7 @@ int file_read (const char *path, char **buf, size_t *msize)
int ret = 0;
int ret2 = 0;
ret = read (fd, *buf, BUFSIZ);
- if (ret <= 0) {
+ if (ret < 0) {
fprintf (stderr, "err: read %s\n", path);
}
else {