Re: [PATCH 1/3] conf: Rename mode parameter in virCPUDefParseXML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 27, 2017 at 11:41:12 -0400, John Ferlan wrote:
> 
> On 04/25/2017 02:48 PM, Jiri Denemark wrote:
> > The type of this parameter is virCPUType so calling it 'mode' is pretty
> > strange, 'type' is a much better name.
> > 
> > Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> > ---
> >  src/conf/cpu_conf.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
> > index b78531e60..623b1699f 100644
> > --- a/src/conf/cpu_conf.c
> > +++ b/src/conf/cpu_conf.c
> > @@ -230,7 +230,7 @@ virCPUDefCopy(const virCPUDef *cpu)
> >  virCPUDefPtr
> >  virCPUDefParseXML(xmlNodePtr node,
> >                    xmlXPathContextPtr ctxt,
> > -                  virCPUType mode)
> > +                  virCPUType type)
> 
> s/type/cputype
> 
> I have this faint recollection that a variable of name 'type' won't be
> good for some compiler.

Brief excerpt from 'git grep "int type"':

src/conf/domain_conf.h:    int type;
src/conf/domain_conf.h:    int type;
src/conf/domain_conf.h:    int type;
src/conf/domain_conf.h:    int type;
src/conf/domain_conf.h:    int type;
src/conf/domain_conf.h:void virDomainDiskSetType(virDomainDiskDefPtr def, int type);
src/conf/domain_conf.h:                                  int type);
src/conf/domain_conf.h:int virDomainControllerFind(const virDomainDef *def, int type, int idx);
src/conf/domain_conf.h:int virDomainControllerFindByType(virDomainDefPtr def, int type);

I think type is okay and widely used.

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux