diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-09-29 01:59:50 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 09:18:10 -0700 |
commit | 527063ba985740e9cd271731c31f503f916681c9 (patch) | |
tree | db8ecc8ac45c432887bc1a7c623625db714c5354 /drivers/char | |
parent | 3bc1fa8ae18f281b40903cce94baba10c3cf9d88 (diff) |
[PATCH] tty_io.c: keep davej sane
Just comment and next "while" look _very_ wrong. Place { correctly to hint
unsuspecting ones that it's the end of the loop actually.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Dave Jones <davej@redhat.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tty_io.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index bb0d9199e994..eb881cfa53e0 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -483,10 +483,9 @@ int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, tb->used += space; copied += space; chars += space; - } - /* There is a small chance that we need to split the data over - several buffers. If this is the case we must loop */ - while (unlikely(size > copied)); + /* There is a small chance that we need to split the data over + several buffers. If this is the case we must loop */ + } while (unlikely(size > copied)); return copied; } EXPORT_SYMBOL(tty_insert_flip_string); @@ -521,10 +520,9 @@ int tty_insert_flip_string_flags(struct tty_struct *tty, copied += space; chars += space; flags += space; - } - /* There is a small chance that we need to split the data over - several buffers. If this is the case we must loop */ - while (unlikely(size > copied)); + /* There is a small chance that we need to split the data over + several buffers. If this is the case we must loop */ + } while (unlikely(size > copied)); return copied; } EXPORT_SYMBOL(tty_insert_flip_string_flags); |