[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1307443181-22278-2-git-send-email-me@akshayjoshi.com>
Date: Tue, 7 Jun 2011 06:39:35 -0400
From: Akshay Joshi <me@...hayjoshi.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Akshay Joshi <me@...hayjoshi.com>,
"Serge E. Hallyn" <serge@...lyn.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
"David S. Miller" <davem@...emloft.net>,
Pavel Emelyanov <xemul@...nvz.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/7] Kernel: space and brace fixes for user_namespace.c
Fix the space prohibitions and unnecessary braces for single statement
blocks as reported by the checkpatch.pl tool.
Signed-off-by: Akshay Joshi <me@...hayjoshi.com>
---
kernel/user_namespace.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index 9da289c..4407b8b 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -97,12 +97,10 @@ uid_t user_ns_map_uid(struct user_namespace *to, const struct cred *cred, uid_t
/* Is cred->user the creator of the target user_ns
* or the creator of one of it's parents?
*/
- for ( tmp = to; tmp != &init_user_ns;
- tmp = tmp->creator->user_ns ) {
- if (cred->user == tmp->creator) {
+ for (tmp = to; tmp != &init_user_ns;
+ tmp = tmp->creator->user_ns)
+ if (cred->user == tmp->creator)
return (uid_t)0;
- }
- }
/* No useful relationship so no mapping */
return overflowuid;
@@ -118,12 +116,10 @@ gid_t user_ns_map_gid(struct user_namespace *to, const struct cred *cred, gid_t
/* Is cred->user the creator of the target user_ns
* or the creator of one of it's parents?
*/
- for ( tmp = to; tmp != &init_user_ns;
- tmp = tmp->creator->user_ns ) {
- if (cred->user == tmp->creator) {
+ for (tmp = to; tmp != &init_user_ns;
+ tmp = tmp->creator->user_ns)
+ if (cred->user == tmp->creator)
return (gid_t)0;
- }
- }
/* No useful relationship so no mapping */
return overflowgid;
--
1.7.4.4
--
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