diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2025-07-25 17:52:52 +0800 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2025-07-30 04:57:56 -0700 |
commit | 8936125e232803e64cb29e107326a942981188d6 (patch) | |
tree | 5d4465203fd74e07306efd81f5f56acadc849e26 | |
parent | 4d9d1a08b796efd54f1e29b42bd95879109fe448 (diff) |
apparmor: Remove the unused variable rules
Variable rules is not effectively used, so delete it.
security/apparmor/lsm.c:182:23: warning: variable ‘rules’ set but not used.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=22942
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
-rw-r--r-- | security/apparmor/lsm.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index cecbb985928f..9a64b2db0267 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -179,10 +179,8 @@ static int apparmor_capget(const struct task_struct *target, kernel_cap_t *effec struct label_it i; label_for_each_confined(i, label, profile) { - struct aa_ruleset *rules; kernel_cap_t allowed; - rules = profile->label.rules[0]; allowed = aa_profile_capget(profile); *effective = cap_intersect(*effective, allowed); *permitted = cap_intersect(*permitted, allowed); |