lkml.org 
[lkml]   [2011]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromAkshay Joshi <>
Subject[PATCH 2/7] Kernel: space and brace fixes for user_namespace.c
DateTue, 7 Jun 2011 06:39:35 -0400
Fix the space prohibitions and unnecessary braces for single statement
blocks as reported by the checkpatch.pl tool.

Signed-off-by: Akshay Joshi <me@akshayjoshi.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


\
 
 \ /
  Last update: 2011-06-07 12:43    [from the cache]
©2003-2010