linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] security: selinux: avc.c:  Remove unused function
@ 2014-12-20 12:32 Rickard Strandqvist
  2014-12-20 22:29 ` Paul Moore
  0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2014-12-20 12:32 UTC (permalink / raw)
  To: Paul Moore, Stephen Smalley
  Cc: Rickard Strandqvist, Eric Paris, James Morris, Serge E. Hallyn,
	selinux, linux-security-module, linux-kernel

Remove the function avc_sidcmp() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 security/selinux/avc.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index a18f1fa..afcc0ae 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -517,11 +517,6 @@ out:
 	return rc;
 }
 
-static inline int avc_sidcmp(u32 x, u32 y)
-{
-	return (x == y || x == SECSID_WILD || y == SECSID_WILD);
-}
-
 /**
  * avc_update_node Update an AVC entry
  * @event : Updating event
-- 
1.7.10.4


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

* Re: [PATCH] security: selinux: avc.c:  Remove unused function
  2014-12-20 12:32 [PATCH] security: selinux: avc.c: Remove unused function Rickard Strandqvist
@ 2014-12-20 22:29 ` Paul Moore
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2014-12-20 22:29 UTC (permalink / raw)
  To: Rickard Strandqvist
  Cc: Stephen Smalley, Eric Paris, James Morris, Serge E. Hallyn,
	selinux, linux-security-module, linux-kernel

On Saturday, December 20, 2014 01:32:10 PM Rickard Strandqvist wrote:
> Remove the function avc_sidcmp() that is not used anywhere.
> 
> This was partially found by using a static code analysis program called
> cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>  security/selinux/avc.c |    5 -----
>  1 file changed, 5 deletions(-)

Thanks, applied to the SELinux next branch with some minor changes to the 
patch's subject line.

> diff --git a/security/selinux/avc.c b/security/selinux/avc.c
> index a18f1fa..afcc0ae 100644
> --- a/security/selinux/avc.c
> +++ b/security/selinux/avc.c
> @@ -517,11 +517,6 @@ out:
>  	return rc;
>  }
> 
> -static inline int avc_sidcmp(u32 x, u32 y)
> -{
> -	return (x == y || x == SECSID_WILD || y == SECSID_WILD);
> -}
> -
>  /**
>   * avc_update_node Update an AVC entry
>   * @event : Updating event

-- 
paul moore
www.paul-moore.com


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

end of thread, other threads:[~2014-12-20 22:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-20 12:32 [PATCH] security: selinux: avc.c: Remove unused function Rickard Strandqvist
2014-12-20 22:29 ` 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).