lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170523011518.4a81aad6@vmware.local.home>
Date:   Tue, 23 May 2017 01:15:18 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     Ingo Molnar <mingo@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 3/7] kernel-trace: Adjust two checks for null pointers
 in compatible_field()

On Fri, 5 May 2017 23:03:23 +0200
SF Markus Elfring <elfring@...rs.sourceforge.net> wrote:

> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Fri, 5 May 2017 20:00:11 +0200
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> The script “checkpatch.pl” pointed information out like the following.
> 
> Comparison to NULL could be written !…
> 
> Thus fix the affected source code place.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  kernel/trace/trace_events_hist.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_events_hist.c
> b/kernel/trace/trace_events_hist.c index df566e21344d..36412deac24c
> 100644 --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -1324,7 +1324,7 @@ static bool compatible_field(struct
> ftrace_event_field *field, {
>  	if (field == test_field)
>  		return true;
> -	if (field == NULL || test_field == NULL)
> +	if (!field || !test_field)

The first two are fine, this one isn't needed.

-- Steve

>  		return false;
>  	if (strcmp(field->name, test_field->name) != 0)
>  		return false;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ