public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] tty: move a definition out of switch block
@ 2009-12-01  7:54 Amerigo Wang
  2009-12-01 15:44 ` Alan Cox
  0 siblings, 1 reply; 7+ messages in thread
From: Amerigo Wang @ 2009-12-01  7:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alan Cox, akpm, Greg Kroah-Hartman, Joe Peterson, Amerigo Wang


It's not good to leave a definition between 'switch'
and its first label. Move it out of the switch block.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Joe Peterson <joe@skyrush.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>

---
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index 2e50f4d..233aa3d 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -502,6 +502,7 @@ static void process_echoes(struct tty_struct *tty)
 			unsigned char op;
 			unsigned char *opp;
 			int no_space_left = 0;
+			unsigned int num_chars, num_bs;
 
 			/*
 			 * If the buffer byte is the start of a multi-byte
@@ -514,8 +515,6 @@ static void process_echoes(struct tty_struct *tty)
 			op = *opp;
 
 			switch (op) {
-				unsigned int num_chars, num_bs;
-
 			case ECHO_OP_ERASE_TAB:
 				if (++opp == buf_end)
 					opp -= N_TTY_BUF_SIZE;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-08 15:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01  7:54 [Patch] tty: move a definition out of switch block Amerigo Wang
2009-12-01 15:44 ` Alan Cox
2009-12-03  8:36   ` Cong Wang
2009-12-03 11:13     ` Alan Cox
2009-12-08 10:10       ` Cong Wang
2009-12-08 15:02         ` Joe Peterson
2009-12-03 15:18     ` Joe Peterson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox