aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/selinuxfs.c
diff options
context:
space:
mode:
authorOndrej Mosnacek <omosnace@redhat.com>2020-02-03 12:27:20 +0100
committerPaul Moore <paul@paul-moore.com>2020-02-11 21:39:41 -0500
commit60abd3181db29ea81742106cc0ac2e27fd05b418 (patch)
tree45792720462b0de5a5ef3eaa7a1269daaae95470 /security/selinux/selinuxfs.c
parentselinux: sel_avc_get_stat_idx should increase position index (diff)
downloadlinux-dev-60abd3181db29ea81742106cc0ac2e27fd05b418.tar.xz
linux-dev-60abd3181db29ea81742106cc0ac2e27fd05b418.zip
selinux: convert cond_list to array
Since it is fixed-size after allocation and we know the size beforehand, using a plain old array is simpler and more efficient. While there, also fix signedness of some related variables/parameters. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/selinuxfs.c')
-rw-r--r--security/selinux/selinuxfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 66e6ed7fac56..533ab170ad52 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1335,14 +1335,14 @@ static void sel_remove_entries(struct dentry *de)
static int sel_make_bools(struct selinux_fs_info *fsi)
{
- int i, ret;
+ int ret;
ssize_t len;
struct dentry *dentry = NULL;
struct dentry *dir = fsi->bool_dir;
struct inode *inode = NULL;
struct inode_security_struct *isec;
char **names = NULL, *page;
- int num;
+ u32 i, num;
int *values = NULL;
u32 sid;