[UNNECESSARY PATCH 05/16] signal: Move case statements to separate lines and for loop neatening
From: Joe Perches
Date: Sun Nov 16 2014 - 15:09:46 EST
Use the normal style for case statements and for loops
Make the initialization and for loop test more expected style too.
Add a break to the last case.
Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
kernel/signal.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index 0efde2d..49562b2 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -110,21 +110,26 @@ static inline int has_pending_signals(sigset_t *signal, sigset_t *blocked)
switch (_NSIG_WORDS) {
default:
- for (i = _NSIG_WORDS, ready = 0; --i >= 0 ;)
+ ready = 0;
+ for (i = _NSIG_WORDS; i >= 0; i--)
ready |= signal->sig[i] & ~blocked->sig[i];
break;
- case 4: ready = signal->sig[3] & ~blocked->sig[3];
+ case 4:
+ ready = signal->sig[3] & ~blocked->sig[3];
ready |= signal->sig[2] & ~blocked->sig[2];
ready |= signal->sig[1] & ~blocked->sig[1];
ready |= signal->sig[0] & ~blocked->sig[0];
break;
- case 2: ready = signal->sig[1] & ~blocked->sig[1];
+ case 2:
+ ready = signal->sig[1] & ~blocked->sig[1];
ready |= signal->sig[0] & ~blocked->sig[0];
break;
- case 1: ready = signal->sig[0] & ~blocked->sig[0];
+ case 1:
+ ready = signal->sig[0] & ~blocked->sig[0];
+ break;
}
return ready != 0;
}
--
2.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/