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: <20190726121317.169d3ab0@gandalf.local.home>
Date:   Fri, 26 Jul 2019 12:13:17 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Matt Helsley <mhelsley@...are.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v3 08/13] recordmcount: Clarify what cleanup() does

On Wed, 24 Jul 2019 14:05:02 -0700
Matt Helsley <mhelsley@...are.com> wrote:

> @@ -436,10 +451,11 @@ static void MIPS64_r_info(Elf64_Rel *const rp, unsigned sym, unsigned type)
>  
>  static int do_file(char const *const fname)
>  {
> -	Elf32_Ehdr *const ehdr = mmap_file(fname);
> +	Elf32_Ehdr *ehdr;
>  	unsigned int reltype = 0;
>  	int rc = -1;
>  

On small nit that I'm going to tweak, is the ordering of the
declarations above. By removing the const and the assignment, you lost
the "upside-down x-mas tree" look of the declaration.

That is, we went from:

static int do_file(char const *const fname)
{
	Elf32_Ehdr *const ehdr = mmap_file(fname);
	unsigned int reltype = 0;
	int rc = -1;

to:

static int do_file(char const *const fname)
{
	Elf32_Ehdr *ehdr;
	unsigned int reltype = 0;
	int rc = -1;


Which, I'll change to:

static int do_file(char const *const fname)
{
	unsigned int reltype = 0;
	Elf32_Ehdr *ehdr;
	int rc = -1;

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ