From 169a0a3f49a573e5d72c53f9e9910f29f263e47b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 4 Sep 2003 21:43:35 +0000 Subject: (elide_tail_lines_pipe): Don't truncate return value from safe_read. --- src/head.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2