audit: remove redundant condition check in kauditd_thread()

Warning is found by the code analysis tool:
  "the condition 'if(ac && rc < 0)' is redundant: ac"

The @ac variable has been checked before. It can't be a null pointer
here, so remove the redundant condition check.

Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
Yunfeng Ye 2019-10-23 21:27:34 +08:00 committed by Paul Moore
parent 245d73698e
commit c34c78dfc1
1 changed files with 2 additions and 2 deletions

View File

@ -830,7 +830,7 @@ static int kauditd_thread(void *dummy)
rc = kauditd_send_queue(sk, portid,
&audit_hold_queue, UNICAST_RETRIES,
NULL, kauditd_rehold_skb);
if (ac && rc < 0) {
if (rc < 0) {
sk = NULL;
auditd_reset(ac);
goto main_queue;
@ -840,7 +840,7 @@ static int kauditd_thread(void *dummy)
rc = kauditd_send_queue(sk, portid,
&audit_retry_queue, UNICAST_RETRIES,
NULL, kauditd_hold_skb);
if (ac && rc < 0) {
if (rc < 0) {
sk = NULL;
auditd_reset(ac);
goto main_queue;