patch-2.1.56 linux/include/linux/tty_flip.h

Next file: linux/kernel/exit.c
Previous file: linux/include/linux/sysv_fs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.55/linux/include/linux/tty_flip.h linux/include/linux/tty_flip.h
@@ -10,10 +10,11 @@
 _INLINE_ void tty_insert_flip_char(struct tty_struct *tty,
 				   unsigned char ch, char flag)
 {
-	if (tty->flip.count++ >= TTY_FLIPBUF_SIZE)
-		return;
-	*tty->flip.flag_buf_ptr++ = flag;
-	*tty->flip.char_buf_ptr++ = ch;
+	if (tty->flip.count < TTY_FLIPBUF_SIZE) {
+		tty->flip.count++;
+		*tty->flip.flag_buf_ptr++ = flag;
+		*tty->flip.char_buf_ptr++ = ch;
+	}
 }
 
 _INLINE_ void tty_schedule_flip(struct tty_struct *tty)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov