Obsolete
/
libipc-old
Archived
3
0
Fork 0

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

more_to_read
Philippe PITTOLI 2016-09-14 00:27:50 +02:00
parent 107ab48deb
commit 8b4481da9f
1 changed files with 1 additions and 1 deletions

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 {