projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67b0b4e
)
selinux: constify write_op[]
author
Eric Biggers
<ebiggers@google.com>
Tue, 17 Jul 2018 17:43:56 +0000
(10:43 -0700)
committer
Paul Moore
<paul@paul-moore.com>
Tue, 17 Jul 2018 20:55:16 +0000
(16:55 -0400)
write_op[] is never modified, so make it 'const'.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/selinuxfs.c
patch
|
blob
|
history
diff --git
a/security/selinux/selinuxfs.c
b/security/selinux/selinuxfs.c
index
d64a06e
..
eb7f12a
100644
(file)
--- a/
security/selinux/selinuxfs.c
+++ b/
security/selinux/selinuxfs.c
@@
-773,7
+773,7
@@
static ssize_t sel_write_relabel(struct file *file, char *buf, size_t size);
static ssize_t sel_write_user(struct file *file, char *buf, size_t size);
static ssize_t sel_write_member(struct file *file, char *buf, size_t size);
-static ssize_t (*write_op[])(struct file *, char *, size_t) = {
+static ssize_t (*
const
write_op[])(struct file *, char *, size_t) = {
[SEL_ACCESS] = sel_write_access,
[SEL_CREATE] = sel_write_create,
[SEL_RELABEL] = sel_write_relabel,