xbps-install/util.c: do not check errno for isatty().

Fixes line truncation in musl. As @chneukirchen pointed out, POSIX
does not need to set errno. Just use its return value.
This commit is contained in:
Juan RP 2016-04-24 14:02:52 +02:00
parent eb3d227d61
commit 447a2f43ad

View File

@ -41,7 +41,7 @@ get_maxcols(void)
{
struct winsize ws;
if (!isatty(STDOUT_FILENO) && errno == ENOTTY) {
if (!isatty(STDOUT_FILENO)) {
/* not a TTY, don't use any limit */
return 0;
}