提交 0fd71a62 编写于 作者: P Prarit Bhargava 提交者: Paul Moore

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 <paul@paul-moore.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Eric Paris <eparis@parisplace.org>
Cc: James Morris <james.l.morris@oracle.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Andrew Perepechko <anserper@ya.ru>
Cc: Jeff Vander Stoep <jeffv@google.com>
Cc: selinux@tycho.nsa.gov
Cc: Eric Paris <eparis@redhat.com>
Cc: Paul Moore <pmoore@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
Acked-by: NDavid Howells <dhowells@redhat.com>
[PM: wrapped description for checkpatch.pl, use "selinux:..." as subj]
Signed-off-by: NPaul Moore <paul@paul-moore.com>
上级 61d612ea
...@@ -17,6 +17,6 @@ int security_get_bools(int *len, char ***names, int **values); ...@@ -17,6 +17,6 @@ int security_get_bools(int *len, char ***names, int **values);
int security_set_bools(int len, 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 #endif
...@@ -2696,7 +2696,7 @@ int security_set_bools(int len, int *values) ...@@ -2696,7 +2696,7 @@ int security_set_bools(int len, int *values)
return rc; return rc;
} }
int security_get_bool_value(int bool) int security_get_bool_value(int index)
{ {
int rc; int rc;
int len; int len;
...@@ -2705,10 +2705,10 @@ int security_get_bool_value(int bool) ...@@ -2705,10 +2705,10 @@ int security_get_bool_value(int bool)
rc = -EFAULT; rc = -EFAULT;
len = policydb.p_bools.nprim; len = policydb.p_bools.nprim;
if (bool >= len) if (index >= len)
goto out; goto out;
rc = policydb.bool_val_to_struct[bool]->state; rc = policydb.bool_val_to_struct[index]->state;
out: out:
read_unlock(&policy_rwlock); read_unlock(&policy_rwlock);
return rc; return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册