diff options
author | Jim Meyering <meyering@redhat.com> | 2009-08-31 17:01:26 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-09-01 12:10:07 +0200 |
commit | 68c9b3183491638492f1029c553160e11cd69f64 (patch) | |
tree | fe8d7f9f0689e2b7154bcc76919366605c4e2bef /src | |
parent | 856ba44297c7a05593e61b1cd696be2a296e64ce (diff) | |
download | coreutils-68c9b3183491638492f1029c553160e11cd69f64.tar.xz |
maint: tail: remove unnecessary initialization
* src/tail.c (tail_bytes): Don't compute "diff" twice.
Diffstat (limited to 'src')
-rw-r--r-- | src/tail.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |