All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin King <colin.king@canonical.com>
To: Paul Moore <paul@paul-moore.com>,
	Stephen Smalley <sds@tycho.nsa.gov>,
	Eric Paris <eparis@parisplace.org>,
	James Morris <james.l.morris@oracle.com>,
	"Serge E . Hallyn" <serge@hallyn.com>,
	Markus Elfring <elfring@users.sourceforge.net>,
	selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] selinux: remove redundant assignment to len
Date: Sat, 14 Oct 2017 16:00:49 +0100	[thread overview]
Message-ID: <20171014150049.1053-1-colin.king@canonical.com> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: Colin King <colin.king@canonical.com>
To: linux-security-module@vger.kernel.org
Subject: [PATCH] selinux: remove redundant assignment to len
Date: Sat, 14 Oct 2017 15:00:49 +0000	[thread overview]
Message-ID: <20171014150049.1053-1-colin.king@canonical.com> (raw)
In-Reply-To: <20171014124655.32438-1-colin.king@canonical.com>

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


WARNING: multiple messages have this Message-ID (diff)
From: colin.king@canonical.com (Colin King)
To: linux-security-module@vger.kernel.org
Subject: [PATCH] selinux: remove redundant assignment to len
Date: Sat, 14 Oct 2017 16:00:49 +0100	[thread overview]
Message-ID: <20171014150049.1053-1-colin.king@canonical.com> (raw)

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

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2017-10-14 15:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-14 15:00 Colin King [this message]
2017-10-14 15:00 ` [PATCH] selinux: remove redundant assignment to len Colin King
2017-10-14 15:00 ` Colin King
2017-10-16 22:37 ` Paul Moore
2017-10-16 22:37   ` Paul Moore
2017-10-16 22:37   ` Paul Moore
  -- strict thread matches above, loose matches on Subject: below --
2017-10-14 12:46 [PATCH] selinux: remove redundant assignment to str Colin King
2017-10-14 12:46 ` Colin King
2017-10-14 12:46 ` Colin King
2017-10-16 22:35 ` Paul Moore
2017-10-16 22:35   ` Paul Moore
2017-10-16 22:35   ` Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171014150049.1053-1-colin.king@canonical.com \
    --to=colin.king@canonical.com \
    --cc=elfring@users.sourceforge.net \
    --cc=eparis@parisplace.org \
    --cc=james.l.morris@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.