lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 16 Nov 2014 12:09:14 -0800
From:	Joe Perches <joe@...ches.com>
To:	Ionut Alexa <ionut.m.alexa@...il.com>, linux-kernel@...r.kernel.org
Cc:	Al Viro <viro@...IV.linux.org.uk>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [UNNECESSARY PATCH 07/16] signal: Add braces

Add braces to arms where other arms have them.

Signed-off-by: Joe Perches <joe@...ches.com>
---
 kernel/signal.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index eb0a7c5..baddb92 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -934,15 +934,15 @@ static void complete_signal(int sig, struct task_struct *p, int group)
 	 * If the main thread wants the signal, it gets first crack.
 	 * Probably the least surprising to the average bear.
 	 */
-	if (wants_signal(sig, p))
+	if (wants_signal(sig, p)) {
 		t = p;
-	else if (!group || thread_group_empty(p))
+	} else if (!group || thread_group_empty(p)) {
 		/*
 		 * There is just one thread and it does not need to be woken.
 		 * It will dequeue unblocked signals before it runs again.
 		 */
 		return;
-	else {
+	} else {
 		/*
 		 * Otherwise try to find a suitable thread.
 		 */
@@ -1411,8 +1411,9 @@ int kill_pid_info_as_cred(int sig, struct siginfo *info, struct pid *pid,
 		if (lock_task_sighand(p, &flags)) {
 			ret = __send_signal(sig, info, p, 1, 0);
 			unlock_task_sighand(p, &flags);
-		} else
+		} else {
 			ret = -ESRCH;
+		}
 	}
 out_unlock:
 	rcu_read_unlock();
@@ -1675,11 +1676,11 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
 	info.si_stime = cputime_to_clock_t(stime + tsk->signal->stime);
 
 	info.si_status = tsk->exit_code & 0x7f;
-	if (tsk->exit_code & 0x80)
+	if (tsk->exit_code & 0x80) {
 		info.si_code = CLD_DUMPED;
-	else if (tsk->exit_code & 0x7f)
+	} else if (tsk->exit_code & 0x7f) {
 		info.si_code = CLD_KILLED;
-	else {
+	} else {
 		info.si_code = CLD_EXITED;
 		info.si_status = tsk->exit_code >> 8;
 	}
-- 
2.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ