qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] i440fx-test: guard ARRAY_SIZE de


From: Stefan Weil
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] i440fx-test: guard ARRAY_SIZE definition with #ifndef
Date: Thu, 30 Apr 2015 21:28:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0

Am 30.04.2015 um 21:16 schrieb Emilio G. Cota:
ARRAY_SIZE is defined in osdep.h so having an unconditional
definition here is fragile.

Signed-off-by: Emilio G. Cota <address@hidden>
---
  tests/i440fx-test.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c
index d0bc8de..d610e66 100644
--- a/tests/i440fx-test.c
+++ b/tests/i440fx-test.c
@@ -27,7 +27,9 @@
#define BROKEN 1 +#ifndef ARRAY_SIZE
  #define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
+#endif
typedef struct TestData
  {

Why not include osdep.h via qemu-common.h and remove all other include statements which then are no longer needed? I'd prefer that variant.

Cheers
Stefan




reply via email to

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