Archived
3
0

communication: if read == 0 => it's ok

This commit is contained in:
Philippe PITTOLI 2016-09-14 00:27:50 +02:00
parent 107ab48deb
commit 8b4481da9f

View File

@ -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 {