qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] coccinelle: add g_assert_cmp* to


From: Eric Blake
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] coccinelle: add g_assert_cmp* to macro file
Date: Wed, 18 May 2016 08:22:32 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 05/18/2016 03:27 AM, Paolo Bonzini wrote:
> This helps applying semantic patches to unit tests.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  scripts/cocci-macro-file.h | 6 ++++++
>  1 file changed, 6 insertions(+)

Reviewed-by: Eric Blake <address@hidden>

> 
> diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h
> index eceb4be..9f2e72e 100644
> --- a/scripts/cocci-macro-file.h
> +++ b/scripts/cocci-macro-file.h
> @@ -117,3 +117,9 @@ struct {                                                  
>               \
>          type *tqe_next;       /* next element */                        \
>          type **tqe_prev;      /* address of previous next element */    \
>  }
> +
> +/* From glib */
> +#define g_assert_cmpint(a, op, b)   g_assert(a op b)
> +#define g_assert_cmpuint(a, op, b)   g_assert(a op b)

Odd indentation, compared to the other lines.

> +#define g_assert_cmphex(a, op, b)   g_assert(a op b)
> +#define g_assert_cmpstr(a, op, b)   g_assert(strcmp(a, b) op 0)
> 

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]