summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linux.alibaba.com>2020-11-08 14:45:42 +0800
committerCasey Schaufler <casey@schaufler-ca.com>2020-11-16 17:26:31 -0800
commit9b0072e2b2b588ad75c94f2c6e6c52c8f4bd2657 (patch)
tree5d68726592b12c903831166eccf3e6cdcf9525d0 /security
parent7da31b858ec278f90603506ce7fa7eed3c53c8d7 (diff)
downloadlwn-9b0072e2b2b588ad75c94f2c6e6c52c8f4bd2657.tar.gz
lwn-9b0072e2b2b588ad75c94f2c6e6c52c8f4bd2657.zip
security/smack: remove unused varible 'rc'
This varible isn't used and can be removed to avoid a gcc warning: security/smack/smack_lsm.c:3873:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com> Cc: Casey Schaufler <casey@schaufler-ca.com> Cc: James Morris <jmorris@namei.org> Cc: "Serge E. Hallyn" <serge@hallyn.com> Cc: linux-security-module@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security')
-rw-r--r--security/smack/smack_lsm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 5c90b9fa4d40..9994fcfafd70 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -3870,7 +3870,6 @@ static struct smack_known *smack_from_netlbl(struct sock *sk, u16 family,
struct netlbl_lsm_secattr secattr;
struct socket_smack *ssp = NULL;
struct smack_known *skp = NULL;
- int rc;
netlbl_secattr_init(&secattr);
@@ -3880,7 +3879,7 @@ static struct smack_known *smack_from_netlbl(struct sock *sk, u16 family,
if (netlbl_skbuff_getattr(skb, family, &secattr) == 0) {
skp = smack_from_secattr(&secattr, ssp);
if (secattr.flags & NETLBL_SECATTR_CACHEABLE)
- rc = netlbl_cache_add(skb, family, &skp->smk_netlabel);
+ netlbl_cache_add(skb, family, &skp->smk_netlabel);
}
netlbl_secattr_destroy(&secattr);