Remove a warning by adding extra parentheses.

GCC generates warnings when using "if (foo = bar)". In this case its use
is valid.
This commit is contained in:
Ed Schouten 2010-01-02 10:13:21 +00:00
parent b3c73ef101
commit d93708c3e6

View File

@ -126,7 +126,7 @@ main(int argc, char *argv[])
if ((fscript = fopen(fname, aflg ? "a" : "w")) == NULL)
err(1, "%s", fname);
if (ttyflg = isatty(STDIN_FILENO)) {
if ((ttyflg = isatty(STDIN_FILENO)) != 0) {
if (tcgetattr(STDIN_FILENO, &tt) == -1)
err(1, "tcgetattr");
if (ioctl(STDIN_FILENO, TIOCGWINSZ, &win) == -1)