HomePhabricator

Cast EOF to get a proper comparison.

Description

Cast EOF to get a proper comparison.

On PowerPC, and maybe some other architectures, 'char' is unsigned. Comparing
an unsigned char with a signed int (-1) is always false. To fix this, down-cast
EOF to a char.

Details

Committed
jhibbitsFeb 11 2015, 9:31 PM
Parents
rL228908: Quiet Coverity
Branches
Unknown
Tags
Unknown