|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH 02/29] pci: remove superfluous parenthesis |
Date: | Tue, 18 Jul 2017 14:16:17 -1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07/17/2017 08:09 PM, Philippe Mathieu-Daudé wrote:
#define IOTEST_TEST(i) (iotest_test[((i) % ARRAY_SIZE(iotest_test))]) #define IOTEST_TYPE(i) (iotest_type[((i) / ARRAY_SIZE(iotest_test))])
Looks like array[(x)] is another candidate.
-#define IOTEST_MAX_TEST (ARRAY_SIZE(iotest_test)) -#define IOTEST_MAX_TYPE (ARRAY_SIZE(iotest_type)) +#define IOTEST_MAX_TEST ARRAY_SIZE(iotest_test) +#define IOTEST_MAX_TYPE ARRAY_SIZE(iotest_type)
r~
[Prev in Thread] | Current Thread | [Next in Thread] |