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

Next file: linux/include/linux/wireless.h
Previous file: linux/include/linux/tty.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.30/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