summaryrefslogtreecommitdiffstats
path: root/usr.bin/script/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/script/script.c')
-rw-r--r--usr.bin/script/script.c2
1 files changed, 1 insertions, 1 deletions
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)
OpenPOWER on IntegriCloud