summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-09-04 21:43:12 +0000
committerJim Meyering <jim@meyering.net>2003-09-04 21:43:12 +0000
commit7750d1ac2de4cb0089e1529e654be2bfea4baa0b (patch)
tree1fc94a1400fc2c31a39935159c9f5fc75400640e /src
parent7cda1f537342ac6cf39d423ad209ec92b019c8ac (diff)
downloadcoreutils-7750d1ac2de4cb0089e1529e654be2bfea4baa0b.tar.xz
(pipe_lines): Don't truncate return value from safe_read.
Diffstat (limited to 'src')
-rw-r--r--src/tail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tail.c b/src/tail.c
index f4299c9b8..019130362 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -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;