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:
parent
eb3d227d61
commit
447a2f43ad
@ -41,7 +41,7 @@ get_maxcols(void)
|
|||||||
{
|
{
|
||||||
struct winsize ws;
|
struct winsize ws;
|
||||||
|
|
||||||
if (!isatty(STDOUT_FILENO) && errno == ENOTTY) {
|
if (!isatty(STDOUT_FILENO)) {
|
||||||
/* not a TTY, don't use any limit */
|
/* not a TTY, don't use any limit */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user