diff options
-rw-r--r-- | net/core/wireless.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/core/wireless.c b/net/core/wireless.c index 8f7f3abdb224..21c091dd39ee 100644 --- a/net/core/wireless.c +++ b/net/core/wireless.c | |||
@@ -349,8 +349,7 @@ static const struct iw_ioctl_description standard_ioctl[] = { | |||
349 | .max_tokens = sizeof(struct iw_pmksa), | 349 | .max_tokens = sizeof(struct iw_pmksa), |
350 | }, | 350 | }, |
351 | }; | 351 | }; |
352 | static const unsigned standard_ioctl_num = (sizeof(standard_ioctl) / | 352 | static const unsigned standard_ioctl_num = ARRAY_SIZE(standard_ioctl); |
353 | sizeof(struct iw_ioctl_description)); | ||
354 | 353 | ||
355 | /* | 354 | /* |
356 | * Meta-data about all the additional standard Wireless Extension events | 355 | * Meta-data about all the additional standard Wireless Extension events |
@@ -400,8 +399,7 @@ static const struct iw_ioctl_description standard_event[] = { | |||
400 | .max_tokens = sizeof(struct iw_pmkid_cand), | 399 | .max_tokens = sizeof(struct iw_pmkid_cand), |
401 | }, | 400 | }, |
402 | }; | 401 | }; |
403 | static const unsigned standard_event_num = (sizeof(standard_event) / | 402 | static const unsigned standard_event_num = ARRAY_SIZE(standard_event); |
404 | sizeof(struct iw_ioctl_description)); | ||
405 | 403 | ||
406 | /* Size (in bytes) of the various private data types */ | 404 | /* Size (in bytes) of the various private data types */ |
407 | static const char iw_priv_type_size[] = { | 405 | static const char iw_priv_type_size[] = { |