lkml.org 
[lkml]   [2010]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fix findings from checkpatch.pl
Date
Well, I'll pick some low hanging fruits ...
(http://people.redhat.com/mingo/tip.git/README)

Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
---
kernel/user_namespace.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index 2591583..29994c8 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -95,11 +95,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 */
@@ -116,11 +115,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 */
\
 
 \ /
  Last update: 2010-12-01 14:45    [W:0.025 / U:3.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site