This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Speed up find_pc_section


> Date: Fri, 11 Sep 2009 00:29:19 -0700
> From: Paul Pluzhnikov <ppluzhnikov@google.com>
> 
>  if (sect1_addr < sect2_addr)
>     return -1;
>   else if (sect1_addr > sect2_addr)
>     return 1;
> 
> -  return 0;
> +  if (sect1->objfile->mtime < sect2->objfile->mtime) return -1;
> +  if (sect1->objfile->mtime > sect2->objfile->mtime) return 1;
> +  return 0;
> }

This snippet caught my eye.  Please put those return statements on a
line of their own.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]