Message ID | 1430085867-22514-1-git-send-email-cota@braap.org |
---|---|
State | New |
Headers | show |
On Sun, Apr 26, 2015 at 3:04 PM, Emilio G. Cota <cota@braap.org> wrote: > It's defined in osdep.h and shouldn't be redefined here. > > Signed-off-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> It looks like there may be another one too: hw/audio/fmopl.c:#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) Regards, Peter > --- > tests/i440fx-test.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c > index d0bc8de..33a7ecb 100644 > --- a/tests/i440fx-test.c > +++ b/tests/i440fx-test.c > @@ -27,8 +27,6 @@ > > #define BROKEN 1 > > -#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) > - > typedef struct TestData > { > int num_cpus; > -- > 1.9.1 > >
On Sun, Apr 26, 2015 at 19:18:41 -0700, Peter Crosthwaite wrote: > On Sun, Apr 26, 2015 at 3:04 PM, Emilio G. Cota <cota@braap.org> wrote: > > It's defined in osdep.h and shouldn't be redefined here. > > > > Signed-off-by: Emilio G. Cota <cota@braap.org> > > > Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Thanks for having a look! > It looks like there may be another one too: > > hw/audio/fmopl.c:#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) That one is protected by #ifndef ARRAY_SIZE and AFAICT the file does not include any qemu headers, so we can safely leave it as is. Emilio
On 27/04/2015 00:04, Emilio G. Cota wrote: > It's defined in osdep.h and shouldn't be redefined here. > > Signed-off-by: Emilio G. Cota <cota@braap.org> > --- > tests/i440fx-test.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c > index d0bc8de..33a7ecb 100644 > --- a/tests/i440fx-test.c > +++ b/tests/i440fx-test.c > @@ -27,8 +27,6 @@ > > #define BROKEN 1 > > -#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) > - > typedef struct TestData > { > int num_cpus; > Looks good; I am CCing qemu-trivial@nongnu.org so that Michael will notice this patch. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Paolo
Applied to -trivial, thanks! So much for removing one line :) /mjt
diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c index d0bc8de..33a7ecb 100644 --- a/tests/i440fx-test.c +++ b/tests/i440fx-test.c @@ -27,8 +27,6 @@ #define BROKEN 1 -#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) - typedef struct TestData { int num_cpus;
It's defined in osdep.h and shouldn't be redefined here. Signed-off-by: Emilio G. Cota <cota@braap.org> --- tests/i440fx-test.c | 2 -- 1 file changed, 2 deletions(-)