[libvirt] [PATCH 2/4] vmwarevertest: drop VIR_FROM_THIS definition

Michal Privoznik posted 4 patches 8 years, 7 months ago
[libvirt] [PATCH 2/4] vmwarevertest: drop VIR_FROM_THIS definition
Posted by Michal Privoznik 8 years, 7 months ago
Firstly, this definition is in a c99 comment, secondly it is not
needed as VIR_FROM_THIS is defined from vmware/vmware_conf.h.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 tests/vmwarevertest.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tests/vmwarevertest.c b/tests/vmwarevertest.c
index 3dbe08b..e0e36fe 100644
--- a/tests/vmwarevertest.c
+++ b/tests/vmwarevertest.c
@@ -27,8 +27,6 @@
 
 # include "vmware/vmware_conf.h"
 
-//# define VIR_FROM_THIS VIR_FROM_NONE
-
 struct testInfo {
     const char *vmware_type;
     const char *name;
-- 
2.10.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/4] vmwarevertest: drop VIR_FROM_THIS definition
Posted by Peter Krempa 8 years, 7 months ago
On Thu, Apr 27, 2017 at 09:01:58 +0200, Michal Privoznik wrote:
> Firstly, this definition is in a c99 comment, secondly it is not
> needed as VIR_FROM_THIS is defined from vmware/vmware_conf.h.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  tests/vmwarevertest.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/tests/vmwarevertest.c b/tests/vmwarevertest.c
> index 3dbe08b..e0e36fe 100644
> --- a/tests/vmwarevertest.c
> +++ b/tests/vmwarevertest.c
> @@ -27,8 +27,6 @@
>  
>  # include "vmware/vmware_conf.h"
>  
> -//# define VIR_FROM_THIS VIR_FROM_NONE
> -

This test uses the virAsprintf macro which uses the VIR_FROM_THIS macro.
I think the test file should set it explicitly rather than depend on the
one defined by including the header.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/4] vmwarevertest: drop VIR_FROM_THIS definition
Posted by Daniel P. Berrange 8 years, 7 months ago
On Thu, Apr 27, 2017 at 09:36:19AM +0200, Peter Krempa wrote:
> On Thu, Apr 27, 2017 at 09:01:58 +0200, Michal Privoznik wrote:
> > Firstly, this definition is in a c99 comment, secondly it is not
> > needed as VIR_FROM_THIS is defined from vmware/vmware_conf.h.
> > 
> > Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> > ---
> >  tests/vmwarevertest.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/tests/vmwarevertest.c b/tests/vmwarevertest.c
> > index 3dbe08b..e0e36fe 100644
> > --- a/tests/vmwarevertest.c
> > +++ b/tests/vmwarevertest.c
> > @@ -27,8 +27,6 @@
> >  
> >  # include "vmware/vmware_conf.h"
> >  
> > -//# define VIR_FROM_THIS VIR_FROM_NONE
> > -
> 
> This test uses the virAsprintf macro which uses the VIR_FROM_THIS macro.
> I think the test file should set it explicitly rather than depend on the
> one defined by including the header.

Almost all our code puts the VIR_FROM_THIS define in the .c file, so IMHO
we should fix vmware_conf.h to match

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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