diff options
author | Alejandro Martinez Ruiz <alex@flawedcode.org> | 2007-10-18 10:00:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:03:36 -0800 |
commit | 4c3616cdda0632a3d0e39069765f9ea0e6bd093e (patch) | |
tree | d913f63996d479394bcdabd21ebfbdbe16bd1844 /drivers/net/pcnet32.c | |
parent | f59d9782751bf1a2c51e7e1e9f614ffec35fb52e (diff) | |
download | op-kernel-dev-4c3616cdda0632a3d0e39069765f9ea0e6bd093e.zip op-kernel-dev-4c3616cdda0632a3d0e39069765f9ea0e6bd093e.tar.gz |
netdev: use ARRAY_SIZE() instead of sizeof(array) / ETH_GSTRING_LEN
Using ARRAY_SIZE() on arrays of the form array[][K] makes it unnecessary
to know the value of K when checking its size.
Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/pcnet32.c')
-rw-r--r-- | drivers/net/pcnet32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 90498ff..c4b74e9 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -137,7 +137,7 @@ static const char pcnet32_gstrings_test[][ETH_GSTRING_LEN] = { "Loopback test (offline)" }; -#define PCNET32_TEST_LEN (sizeof(pcnet32_gstrings_test) / ETH_GSTRING_LEN) +#define PCNET32_TEST_LEN ARRAY_SIZE(pcnet32_gstrings_test) #define PCNET32_NUM_REGS 136 |