From 68c9b3183491638492f1029c553160e11cd69f64 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 31 Aug 2009 17:01:26 +0200 Subject: maint: tail: remove unnecessary initialization * src/tail.c (tail_bytes): Don't compute "diff" twice. --- src/tail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tail.c b/src/tail.c index ceda5b6cd..f0dbf5d5e 100644 --- a/src/tail.c +++ b/src/tail.c @@ -1437,7 +1437,7 @@ tail_bytes (const char *pretty_filename, int fd, uintmax_t n_bytes, off_t diff = end_pos - current_pos; /* Be careful here. The current position may actually be beyond the end of the file. */ - off_t bytes_remaining = (diff = end_pos - current_pos) < 0 ? 0 : diff; + off_t bytes_remaining = diff < 0 ? 0 : diff; off_t nb = n_bytes; if (bytes_remaining <= nb) -- cgit v1.2.3-70-g09d2