From 0db0a6763d69dfad476e262e21fe33bc924763ee Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 2 Jan 2010 10:13:21 +0000 Subject: Remove a warning by adding extra parentheses. GCC generates warnings when using "if (foo = bar)". In this case its use is valid. --- usr.bin/script/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index ad706dc..bd2de28 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -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) -- cgit v1.1