summaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/policydb.h
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/ss/policydb.h
parent8d269a8e2a8f0bca89022f4ec98de460acb90365 (diff)
downloadlinux-60abd3181db29ea81742106cc0ac2e27fd05b418.tar.bz2
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/ss/policydb.h')
-rw-r--r--security/selinux/ss/policydb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h
index 69b24191fa38..6459616f8487 100644
--- a/security/selinux/ss/policydb.h
+++ b/security/selinux/ss/policydb.h
@@ -272,8 +272,9 @@ struct policydb {
struct cond_bool_datum **bool_val_to_struct;
/* type enforcement conditional access vectors and transitions */
struct avtab te_cond_avtab;
- /* linked list indexing te_cond_avtab by conditional */
+ /* array indexing te_cond_avtab by conditional */
struct cond_node *cond_list;
+ u32 cond_list_len;
/* role allows */
struct role_allow *role_allow;