Skip to content

Commit 8936125

Browse files
Jiapeng Chongjrjohansen
authored andcommitted
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 <[email protected]> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=22942 Signed-off-by: Jiapeng Chong <[email protected]> Signed-off-by: John Johansen <[email protected]>
1 parent 4d9d1a0 commit 8936125

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

security/apparmor/lsm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,8 @@ static int apparmor_capget(const struct task_struct *target, kernel_cap_t *effec
179179
struct label_it i;
180180

181181
label_for_each_confined(i, label, profile) {
182-
struct aa_ruleset *rules;
183182
kernel_cap_t allowed;
184183

185-
rules = profile->label.rules[0];
186184
allowed = aa_profile_capget(profile);
187185
*effective = cap_intersect(*effective, allowed);
188186
*permitted = cap_intersect(*permitted, allowed);

0 commit comments

Comments
 (0)