wc: fix a hang gue to isprint(EOF)
authorDan Fandrich <dan@coneharvesters.com>
Wed, 18 Nov 2009 09:48:09 +0000 (10:48 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 18 Nov 2009 09:48:09 +0000 (10:48 +0100)
commit5b0a7f1a6e66af3f1ff4159d4eb96c30517782b8
treea80cc18d00c88ad9c2211939e7fc1b2d9a13cfe6
parent995f15452a265190c222442758a21fed2233ba14
wc: fix a hang gue to isprint(EOF)

The new isprint replacement macro returns TRUE for isprint(EOF), so the
read loop never returns. Moved the check for EOF immediately after the
read.

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/wc.c