Commit 900920c3 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Terminate when -r reached EOF

parent 7090d802
......@@ -153,7 +153,7 @@ vsl_nextlog(struct vsl *vsl, uint32_t **pp)
assert(vsl->rbuflen >= 8);
i = read(vsl->r_fd, vsl->rbuf, 8);
if (i == 0)
return (0);
return (-1);
if (i != 8)
return (-1);
l = 2 + VSL_WORDS(VSL_LEN(vsl->rbuf));
......
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