diff options
Diffstat (limited to 'src/head.c')
-rw-r--r-- | src/head.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/head.c b/src/head.c index 3d8103f85..aa58075ce 100644 --- a/src/head.c +++ b/src/head.c @@ -496,7 +496,8 @@ elide_tail_lines_pipe (const char *filename, int fd, uintmax_t n_elide) n_elide newlines, or until EOF, whichever comes first. */ 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; tmp->nlines = 0; |