patch-2.3.99-pre1 linux/drivers/char/pty.c

Next file: linux/drivers/char/radio-gemtek.c
Previous file: linux/drivers/char/ppdev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.51/linux/drivers/char/pty.c linux/drivers/char/pty.c
@@ -174,7 +174,9 @@
 		}
 		up(&tty->flip.pty_sem);
 	} else {
-		c = MIN(count, to->ldisc.receive_room(to));
+		c = to->ldisc.receive_room(to);
+		if (c > count)
+			c = count;
 		to->ldisc.receive_buf(to, buf, 0, c);
 	}
 	

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)