lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220810083935.83452-1-zhounan@nfschina.com>
Date:   Wed, 10 Aug 2022 04:39:35 -0400
From:   zhoun <zhounan@...china.com>
To:     john.johansen@...onical.com, paul@...l-moore.com,
        jmorris@...ei.org, serge@...lyn.com
Cc:     linux-security-module@...r.kernel.org,
        linux-kernel@...r.kernel.org, zhounan <zhounan@...china.com>
Subject: [PATCH] remove unnecessary type casting

From: zhounan <zhounan@...china.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@...china.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ