2016-11-04 12:55:57

by Christopher Covington

[permalink] [raw]
Subject: [PATCH] proc: Trivial brace balancing

As suggested by Documentation/CodingStyle right before section 3.1: Spaces,
use braces on all branches of a conditional statement if they are used on
any branch. No functional changes.

Signed-off-by: Christopher Covington <[email protected]>
---
fs/proc/array.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/proc/array.c b/fs/proc/array.c
index 81818ad..9a3ca9e 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -552,8 +552,9 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
seq_put_decimal_ull(m, " ", mm->arg_end);
seq_put_decimal_ull(m, " ", mm->env_start);
seq_put_decimal_ull(m, " ", mm->env_end);
- } else
+ } else {
seq_puts(m, " 0 0 0 0 0 0 0");
+ }

if (permitted)
seq_put_decimal_ll(m, " ", task->exit_code);
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora
Forum, a Linux Foundation Collaborative Project.


2016-11-04 13:37:26

by Alexey Dobriyan

[permalink] [raw]
Subject: Re: [PATCH] proc: Trivial brace balancing

On Fri, Nov 4, 2016 at 3:55 PM, Christopher Covington
<[email protected]> wrote:

> - } else
> + } else {
> seq_puts(m, " 0 0 0 0 0 0 0");
> + }

Oh, come on, people.