]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: Remove redundant assignment to rc
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Wed, 28 Apr 2021 10:00:15 +0000 (18:00 +0800)
committerPaul Moore <paul@paul-moore.com>
Tue, 11 May 2021 01:48:11 +0000 (21:48 -0400)
commit85f83de53f2cf887d345e4c033735ecce984fe07
tree1969ed00ea059867deba6e83bde3488b8da896fc
parent12d2a41df2b8cedef1c3d96ac344fe518b41ad13
selinux: Remove redundant assignment to rc

Variable rc is set to '-EINVAL' but this value is never read as
it is overwritten or not used later on, hence it is a redundant
assignment and can be removed.

Cleans up the following clang-analyzer warning:

security/selinux/ss/services.c:2103:3: warning: Value stored to 'rc' is
never read [clang-analyzer-deadcode.DeadStores].

security/selinux/ss/services.c:2079:2: warning: Value stored to 'rc' is
never read [clang-analyzer-deadcode.DeadStores].

security/selinux/ss/services.c:2071:2: warning: Value stored to 'rc' is
never read [clang-analyzer-deadcode.DeadStores].

security/selinux/ss/services.c:2062:2: warning: Value stored to 'rc' is
never read [clang-analyzer-deadcode.DeadStores].

security/selinux/ss/policydb.c:2592:3: warning: Value stored to 'rc' is
never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/policydb.c
security/selinux/ss/services.c