less: further tweaks to regular file detection
authorRon Yorston <rmy@pobox.com>
Fri, 31 Jul 2015 16:33:24 +0000 (17:33 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 3 Aug 2015 14:41:19 +0000 (16:41 +0200)
commitb27cf31003774e5aa13491ccb8f1f0721dc5b920
treef2b72d7111d1033063524dd411f9e267bcac1ee4
parentad27a6d3265b2e8a27030a01121afed639bed2da
less: further tweaks to regular file detection

Test explicitly for REOPEN flags:  update_num_lines is called
unconditionally so (num_lines != NOT_REGULAR_FILE) is also true when
num_lines contains a valid number of lines.

The call to fstat doesn't need to be in #if ENABLE_FEATURE_LESS_FLAGS:
the whole function is already in such a test.

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/less.c