Browse Source

replace 1 with STDOUT_FILENO

Jan Klemkow 6 years ago
parent
commit
4db8f38a60
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scroll.c

+ 1 - 1
scroll.c

@@ -66,7 +66,7 @@ sigwinch(int sig)
 {
 	assert(sig == SIGWINCH);
 
-	if (ioctl(1, TIOCGWINSZ, &ws) < 0)
+	if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) < 0)
 		die("ioctl:");
 	if (ioctl(mfd, TIOCSWINSZ, &ws) < 0)
 		die("ioctl:");