Re: [PATCH] audit: remove redundant condition check in kauditd_thread()

From: Paul Moore
Date: Fri Oct 25 2019 - 11:55:13 EST


On Fri, Oct 25, 2019 at 3:14 AM Yunfeng Ye <yeyunfeng@xxxxxxxxxx> wrote:
> On 2019/10/25 13:43, Paul Moore wrote:
> > On October 23, 2019 3:27:50 PM Yunfeng Ye <yeyunfeng@xxxxxxxxxx> wrote:
> >> 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@xxxxxxxxxx>
> >> ---
> >> kernel/audit.c | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Hello,
> >
> > Thank you for the patch. Looking quickly at it, it appears to be correct, unfortunately I'm not in a position to merge non-critical patches, but I expect to merge this next week.
> >
> ok, thanks.

I was able to find some time today to take a closer look and it still
looks good to me so I've merge it into audit/next - thanks!

--
paul moore
www.paul-moore.com