diff options
author | Pádraig Brady <P@draigBrady.com> | 2013-07-09 18:45:34 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-07-12 00:25:42 +0100 |
commit | 5fdb50825f598035d52ea8a26be7611e1a906703 (patch) | |
tree | 837fb75d4ebcae756f0289713b74df1da08c37e3 /tests | |
parent | 90e0e9bf58fd5c9b6aa86c22c6351d830ed1c6eb (diff) | |
download | coreutils-5fdb50825f598035d52ea8a26be7611e1a906703.tar.xz |
head: avoid redundant allocations when reading empty files
* src/head.c (elide_tail_lines_file): For seekable empty files,
or seekable files where the current offset is after the
end of the file, return immediately. Previously the short
circuit code could not be reached due to logic error.
Spotted by coverity.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions