On Wed, 24 Jul 2019 14:05:02 -0700
Matt Helsley <[email protected]> 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

Reply via email to