From e383af6209d3e9983c6989b171bbedc40fc9ffbe Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 21 May 2007 17:58:58 +0200 Subject: Get rid of one variable --- inotail.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inotail.c b/inotail.c index 6f02f78..f9126b7 100644 --- a/inotail.c +++ b/inotail.c @@ -133,7 +133,6 @@ static off_t lines_to_offset_from_end(struct file_struct *f, unsigned long n_lin { char *buf; off_t offset = f->st_size; - ssize_t buffer_size = f->st_blksize; buf = alloc_buffer(f); @@ -141,9 +140,9 @@ static off_t lines_to_offset_from_end(struct file_struct *f, unsigned long n_lin while (offset > 0 && n_lines > 0) { int i; - ssize_t rc, block_size = buffer_size; /* Size of the current block we're reading */ + ssize_t rc, block_size = f->st_blksize; /* Size of the current block we're reading */ - if (offset < buffer_size) + if (offset < f->st_blksize) block_size = offset; /* Start of current block */ -- cgit v1.2.3-54-g00ecf