From: Jim Meyering Date: Mon, 31 Aug 2009 15:01:26 +0000 (+0200) Subject: maint: tail: remove unnecessary initialization X-Git-Tag: v7.6~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68c9b3183491638492f1029c553160e11cd69f64;p=thirdparty%2Fcoreutils.git maint: tail: remove unnecessary initialization * src/tail.c (tail_bytes): Don't compute "diff" twice. --- diff --git a/src/tail.c b/src/tail.c index ceda5b6cdf..f0dbf5d5ef 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)