Messages in this thread Patch in this message | | | Date | Tue, 1 Dec 2009 02:54:44 -0500 | From | Amerigo Wang <> | Subject | [Patch] tty: move a definition out of switch block |
| |
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;
| |