Received: from eggs.gnu.org ([2001:4830:134:3::10]:51814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ynu8J-0001MT-RI for qemu-devel@nongnu.org; Thu, 30 Apr 2015 15:28:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ynu8G-0007gb-Gg for qemu-devel@nongnu.org; Thu, 30 Apr 2015 15:28:27 -0400 Message-ID: <55428253.5020300@weilnetz.de> Date: Thu, 30 Apr 2015 21:28:19 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1430421390-2787-1-git-send-email-cota@braap.org> In-Reply-To: <1430421390-2787-1-git-send-email-cota@braap.org> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] i440fx-test: guard ARRAY_SIZE definition with #ifndef List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Peter Maydell , Peter Crosthwaite , Michael Tokarev , Paolo Bonzini 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 > --- > 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