diff mbox

[1/2] tests/i440fx-test: Don't define ARRAY_SIZE locally

Message ID 1454957357-22094-2-git-send-email-peter.maydell@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Maydell Feb. 8, 2016, 6:49 p.m. UTC
Don't define ARRAY_SIZE locally; instead include osdep.h for it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 tests/i440fx-test.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Eric Blake Feb. 8, 2016, 8:32 p.m. UTC | #1
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 <peter.maydell@linaro.org>
> ---
>  tests/i440fx-test.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> 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;
>
diff mbox

Patch

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;