Only call perror for errors

The previous commit made it over-zealous
parent 1ba36344
......@@ -320,9 +320,12 @@ splicer(void *a)
do {
r = splice(fds[0], NULL, fds[1], NULL, SIZE_MAX,
SPLICE_F_MORE | SPLICE_F_MOVE);
if (r == -1 && errno == EINVAL)
return (splicer_fallback(fds));
perror("splicer unexpected error");
if (r == -1) {
if (errno == EINVAL)
return (splicer_fallback(fds));
else
perror("splicer unexpected error");
}
assert(r >= 0);
} while (r != 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment