chiark / gitweb /
terminal-util: remove unnecessary check of result of isatty() (#4000)
author0xAX <0xAX@users.noreply.github.com>
Fri, 19 Aug 2016 22:51:54 +0000 (01:51 +0300)
committerSven Eden <yamakuzure@gmx.net>
Wed, 5 Jul 2017 06:50:52 +0000 (08:50 +0200)
commit906f94da76802b2aae4dd052018766f5378ae4b8
tree204f9b64264bd2edcfb6c32efbabe7951ca8a2df
parente28a8a014111dbbd4083c0c5790d484001388fbe
terminal-util: remove unnecessary check of result of isatty() (#4000)

After the call of the isatty() we check its result twice in the
open_terminal(). There are no sense to check result of isatty() that
it is less than zero and return -errno, because as described in
documentation:

isatty() returns 1 if fd is an open file descriptor referring to a
terminal;  otherwise 0 is returned, and errno is set to indicate the
error.

So it can't be less than zero.
src/basic/terminal-util.c