Messages in this thread Patch in this message | | | Date | Mon, 30 Nov 2009 04:36:30 -0500 | From | Amerigo Wang <> | Subject | [Patch] fs: move a definition out of switch block |
| |
It's not a good practice to leave a definition between 'switch' and the its first label.
Move it out of the switch block.
Signed-off-by: WANG Cong <amwang@redhat.com> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Christoph Hellwig <hch@lst.de>
--- diff --git a/fs/fcntl.c b/fs/fcntl.c index 2cf93ec..23b0238 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -514,12 +514,12 @@ static void send_sigio_to_task(struct task_struct *p, * sure we read it once and use the same value throughout. */ int signum = ACCESS_ONCE(fown->signum); + siginfo_t si; if (!sigio_perm(p, fown, signum)) return; switch (signum) { - siginfo_t si; default: /* Queue a rt signal with the appropriate fd as its value. We use SI_SIGIO as the source, not
| |