linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selinux: remove redundant assignment to len
@ 2017-10-14 15:00 Colin King
  2017-10-16 22:37 ` Paul Moore
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-10-14 15:00 UTC (permalink / raw)
  To: Paul Moore, Stephen Smalley, Eric Paris, James Morris,
	Serge E . Hallyn, Markus Elfring, selinux, linux-security-module
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable len is being set to zero and this value is never
being read since len is being set to a different value just
a few lines later.  Remove this redundant assignment. Cleans
up clang warning: Value stored to 'len' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 security/selinux/ss/conditional.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c
index 771c96afe1d5..c91543a617ac 100644
--- a/security/selinux/ss/conditional.c
+++ b/security/selinux/ss/conditional.c
@@ -361,7 +361,6 @@ static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list *
 
 	*ret_list = NULL;
 
-	len = 0;
 	rc = next_entry(buf, fp, sizeof(u32));
 	if (rc)
 		return rc;
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] selinux: remove redundant assignment to len
  2017-10-14 15:00 [PATCH] selinux: remove redundant assignment to len Colin King
@ 2017-10-16 22:37 ` Paul Moore
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2017-10-16 22:37 UTC (permalink / raw)
  To: Colin King
  Cc: Stephen Smalley, Eric Paris, James Morris, Serge E . Hallyn,
	Markus Elfring, selinux, linux-security-module, kernel-janitors,
	linux-kernel

On Sat, Oct 14, 2017 at 11:00 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable len is being set to zero and this value is never
> being read since len is being set to a different value just
> a few lines later.  Remove this redundant assignment. Cleans
> up clang warning: Value stored to 'len' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  security/selinux/ss/conditional.c | 1 -
>  1 file changed, 1 deletion(-)

Merged.

> diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c
> index 771c96afe1d5..c91543a617ac 100644
> --- a/security/selinux/ss/conditional.c
> +++ b/security/selinux/ss/conditional.c
> @@ -361,7 +361,6 @@ static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list *
>
>         *ret_list = NULL;
>
> -       len = 0;
>         rc = next_entry(buf, fp, sizeof(u32));
>         if (rc)
>                 return rc;
> --
> 2.14.1
>

-- 
paul moore
www.paul-moore.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-16 22:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-14 15:00 [PATCH] selinux: remove redundant assignment to len Colin King
2017-10-16 22:37 ` Paul Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).