Fixed a regression where it would return EXIT_FAILURE on an empty log.
@@ -2634,7 +2634,7 @@ read_lines (FILE * fp, GLog ** glog, int dry_run)
if (!line && (errno == EAGAIN || errno == EWOULDBLOCK) && test)
return 0;
- return test || ret;
+ return (line && test) || ret;
out:
free (line);
@@ -2669,7 +2669,7 @@ read_lines (FILE * fp, GLog ** glog, int dry_run)
if (!s && (errno == EAGAIN || errno == EWOULDBLOCK) && test)
return 0;
- return test || ret;
+ return (s && test) || ret;
}
#endif
