lkml.org 
[lkml]   [2022]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] remove unnecessary type casting
Date
From: zhounan <zhounan@nfschina.com>

'policy' is already a pointer to the struct aa_profile,
so there is no need to cast 'policy' when it is called.

Signed-off-by: zhounan <zhounan@nfschina.com>
---
security/apparmor/policy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index b0cbc4906cb3..9643801c4ee7 100644
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -1003,7 +1003,7 @@ ssize_t aa_replace_profiles(struct aa_ns *policy_ns, struct aa_label *label,
rcu_assign_pointer(ent->new->parent, aa_get_profile(p));
} else if (policy != &ns->base) {
/* released on profile replacement or free_profile */
- struct aa_profile *p = (struct aa_profile *) policy;
+ struct aa_profile *p = policy;
rcu_assign_pointer(ent->new->parent, aa_get_profile(p));
}
}
--
2.27.0
\
 
 \ /
  Last update: 2022-08-10 10:40    [W:0.035 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site