[libvirt] [PATCH 08/10] list: Change MATCH for common use in virsh

Eric Blake eblake at redhat.com
Wed Sep 5 16:30:01 UTC 2012


On 09/04/2012 09:16 AM, Osier Yang wrote:
> Move definition of MATCH from virsh-domain-monitor.c into
> virsh.h for further use.
> ---
>  tools/virsh-domain-monitor.c |    2 --
>  tools/virsh.h                |    2 ++
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 

Not quite right.

> +++ b/tools/virsh.h
> @@ -47,6 +47,8 @@
>  
>  # define GETTIMEOFDAY(T) gettimeofday(T, NULL)
>  
> +# define MATCH(FLAG) (flags & (FLAG))

If you're going to make the macro reusable, I think it would be better
to put it in the VSH_ namespace, and update all existing callers.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120905/b55fcf60/attachment-0001.sig>


More information about the libvir-list mailing list