On Fri, 2007-02-23 at 08:53 -0800, Nishanth Aravamudan wrote:
> On 23.02.2007 [09:11:55 -0600], Adam Litke wrote:
> > On Thu, 2007-02-22 at 17:07 -0800, Nishanth Aravamudan wrote:
> > > Author: Nishanth Aravamudan <[EMAIL PROTECTED]>
> > > Date:   Thu Feb 22 17:05:46 2007 -0800
> > > 
> > > elflink: rename a seg_info member and a function
> > > 
> > > In struct seg_info, the phdr member is actually the number of the
> > > program header. Make this clearer by renaming the member to num. Also,
> > > rename parse_phdrs() to parse_elf() to indicate its new, extended
> > > functionality.
> > > 
> > > Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
> > > 
> > > diff --git a/elflink.c b/elflink.c
> > > index 6399b9f..59496b8 100644
> > > --- a/elflink.c
> > > +++ b/elflink.c
> > > @@ -190,7 +190,7 @@ struct seg_info {
> > >   unsigned long filesz, memsz, extrasz;
> > >   int prot;
> > >   int fd;
> > > - int phdr;
> > > + int num;
> > >  };
> > 
> > Urg.  I hate structure members with names like 'num'.  Num what?
> 
> It's not num anything. It's the number of the segment the seg_info
> references. I could make it phnum, but that made it too close to the
> ehdr variable e_phnum for me.

In parse_phdrs, the current program header number is being assigned to
it.  If you really want to change it, perhaps phdr_num would work.  But
dropping the reference to program header in the name doesn't make it
better in my opinion.

-- 
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to