mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(pipe_lines): Don't truncate return value from safe_read.
This commit is contained in:
1 parent
7cda1f5373
commit
7750d1ac2d
1 file changed
+2
-1
+2
-1
@@ -536,7 +536,8 @@ pipe_lines (const char *pretty_filename, int fd, uintmax_t n_lines,
|
||||
/* Input is always read into a fresh buffer. */
|
||||
while (1)
|
||||
{
|
||||
n_read = tmp->nbytes = safe_read (fd, tmp->buffer, BUFSIZ);
|
||||
n_read = safe_read (fd, tmp->buffer, BUFSIZ);
|
||||
tmp->nbytes = n_read;
|
||||
if (n_read == 0 || n_read == SAFE_READ_ERROR)
|
||||
break;
|
||||
*read_pos += n_read;
|
||||
|
||||
Reference in new issue
Block a user