lkml.org 
[lkml]   [2010]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] SELinux: Do not assign the same value twice to the same variable
Hi,

It makes little sense to assign the same value to the same variable twice
when there is no code inbetween which could have changed the value of that
variable.


Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
Untested patch below.

policydb.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 94f630d..e5a30ff 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -1866,7 +1866,6 @@ static int genfs_read(struct policydb *p, void *fp)
if (!newc)
goto out;

- rc = -ENOMEM;
newc->u.name = kmalloc(len + 1, GFP_KERNEL);
if (!newc->u.name)
goto out;

--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Plain text mails only, please http://www.expita.com/nomime.html
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html



\
 
 \ /
  Last update: 2010-10-30 23:23    [W:0.043 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site