* [PATCH] selinux: constify write_op[]
@ 2018-07-17 17:43 Eric Biggers
2018-07-17 22:39 ` Paul Moore
0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2018-07-17 17:43 UTC (permalink / raw)
To: selinux, Paul Moore, Stephen Smalley, Eric Paris; +Cc: Eric Biggers
write_op[] is never modified, so make it 'const'.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
security/selinux/selinuxfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index ab77da649b77..fb25396d2966 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -767,7 +767,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,
--
2.18.0.203.gfac676dfb9-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selinux: constify write_op[]
2018-07-17 17:43 [PATCH] selinux: constify write_op[] Eric Biggers
@ 2018-07-17 22:39 ` Paul Moore
0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2018-07-17 22:39 UTC (permalink / raw)
To: ebiggers; +Cc: selinux, Stephen Smalley, Eric Paris
On Tue, Jul 17, 2018 at 1:45 PM Eric Biggers <ebiggers@google.com> wrote:
>
> write_op[] is never modified, so make it 'const'.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> security/selinux/selinuxfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Merged, thanks.
> diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
> index ab77da649b77..fb25396d2966 100644
> --- a/security/selinux/selinuxfs.c
> +++ b/security/selinux/selinuxfs.c
> @@ -767,7 +767,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,
> --
> 2.18.0.203.gfac676dfb9-goog
--
paul moore
www.paul-moore.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-17 22:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 17:43 [PATCH] selinux: constify write_op[] Eric Biggers
2018-07-17 22:39 ` Paul Moore
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.