security/selinux: Change bool variable name to index.
PATCH 1/1 security/selinux: Change bool variable name to index.
security_get_bool_value(int bool) argument "bool" conflicts with in-kernel macros such as BUILD_BUG(). This patch changes this to index which isn't a type.
Cc Paul Moore <[email protected]>
Cc Stephen Smalley <[email protected]>
Cc Eric Paris <[email protected]>
Cc James Morris <[email protected]>
Cc "Serge E. Hallyn" <[email protected]>
Cc Rasmus Villemoes <[email protected]>
Cc Andrew Perepechko <[email protected]>
Cc Jeff Vander Stoep <[email protected]>
Cc Eric Paris <[email protected]>
Cc Paul Moore <[email protected]>
Cc David Howells <[email protected]>
Signed-off-by Prarit Bhargava <[email protected]>
--- security/selinux/include/conditional.h | 2 +- security/selinux/ss/services.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
security/selinux/include/conditional.h +1 -1
@@ -17,6 +17,6 @@ int security_get_bools(int *len, char ***names, int **values);int security_set_bools (int len,int *values); -int security_get_bool_value (int bool); +int security_get_bool_value (int index);#endif
security/selinux/ss/services.c +3 -3
@@ -2696,7 +2696,7 @@ out:return rc; } -int security_get_bool_value (int bool) +int security_get_bool_value (int index) {int rc;int len;
@@ -2705,10 +2705,10 @@ int security_get_bool_value(int bool) rc = -EFAULT ; len = policydb.p_bools.nprim; -if (bool >= len) +if (index >= len) goto out; - rc = policydb.bool_val_to_struct[bool]->state; + rc = policydb.bool_val_to_struct[index]->state; out:read_unlock (&policy_rwlock);return rc;
Signature · 1 line
1.7.9.3
Quoted 5 lines · Prarit Bhargava
security_get_bool_value(int bool)argument "bool" conflicts with in-kernel macros such asBUILD_BUG(). This patch changes this to index which isn't a type.Signed-off-by Prarit Bhargava <[email protected]>
Acked-by David Howells <[email protected]>
Paul Moore
maintainerQuoted 17 lines · Prarit Bhargava
security_get_bool_value(int bool)argument "bool" conflicts with in-kernel macros such asBUILD_BUG(). This patch changes this to index which isn't a type.Cc Paul Moore <[email protected]>Cc Stephen Smalley <[email protected]>Cc Eric Paris <[email protected]>Cc James Morris <[email protected]>Cc "Serge E. Hallyn" <[email protected]>Cc Rasmus Villemoes <[email protected]>Cc Andrew Perepechko <[email protected]>Cc Jeff Vander Stoep <[email protected]>Cc Eric Paris <[email protected]>Cc Paul Moore <[email protected]>Cc David Howells <[email protected]>Signed-off-by Prarit Bhargava <[email protected]>
Quoted 4 lines
--- security/selinux/include/conditional.h | 2 +- security/selinux/ss/services.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
Looks good to me, merged into the SELinux next branch.
Quoted 39 lines
(quoted diff) +0
-0
b/security/selinux/include/conditional.hindex 67ce7a8..ff4fddc 100644security/selinux/include/conditional.h +1
-1@@ -17,6 +17,6 @@ int security_get_bools(int *len, char ***names, int **values);int security_set_bools (int len,int *values); -int security_get_bool_value (int bool); +int security_get_bool_value (int index);#endif
security/selinux/ss/services.c +3
-3@@ -2696,7 +2696,7 @@ out:return rc; } -int security_get_bool_value (int bool) +int security_get_bool_value (int index) {int rc;int len;@@ -2705,10 +2705,10 @@ int security_get_bool_value(int bool) rc = -EFAULT ; len = policydb.p_bools.nprim; -if (bool >= len) +if (index >= len) goto out; - rc = policydb.bool_val_to_struct[bool]->state; + rc = policydb.bool_val_to_struct[index]->state; out:read_unlock (&policy_rwlock);return rc;
Signature · 2 lines
paul moore www.paul-moore.com