qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] tests/i440fx-test: Don't define ARRAY_SIZE


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 1/2] tests/i440fx-test: Don't define ARRAY_SIZE locally
Date: Mon, 8 Feb 2016 13:32:01 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 02/08/2016 11:49 AM, Peter Maydell wrote:
> Don't define ARRAY_SIZE locally; instead include osdep.h for it.
> 
> Signed-off-by: Peter Maydell <address@hidden>
> ---
>  tests/i440fx-test.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

> 
> diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c
> index 7fa1709..0665caf 100644
> --- a/tests/i440fx-test.c
> +++ b/tests/i440fx-test.c
> @@ -12,6 +12,7 @@
>   * See the COPYING file in the top-level directory.
>   */
>  
> +#include "qemu/osdep.h"
>  #include <glib.h>
>  #include <string.h>
>  #include <stdio.h>
> @@ -27,8 +28,6 @@
>  
>  #define BROKEN 1
>  
> -#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
> -
>  typedef struct TestData
>  {
>      int num_cpus;
> 

-- 
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]