Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751558AbdGaULn (ORCPT ); Mon, 31 Jul 2017 16:11:43 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:43227 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751052AbdGaULm (ORCPT ); Mon, 31 Jul 2017 16:11:42 -0400 Subject: Re: security/apparmor/label.c:1498]: (style) Redundant condition To: David Binderman , "james.l.morris@oracle.com" , "serge@hallyn.com" , "linux-security-module@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: From: John Johansen Organization: Canonical Message-ID: <16fc1e64-600e-d1a8-fb59-5910cd3ab92e@canonical.com> Date: Mon, 31 Jul 2017 13:11:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 416 Lines: 13 On 07/17/2017 12:34 AM, David Binderman wrote: > Hello there, > > > security/apparmor/label.c:1498]: (style) Redundant condition: prev_ns. '!prev_ns || (prev_ns && *prev_ns!=profile->ns)' is equivalent to '!prev_ns || *prev_ns!=profile->ns' > > Source code is > > if (view != profile->ns && > (!prev_ns || (prev_ns && *prev_ns != profile->ns))) { > yep, I will add the fix to the next pull request