Skip to content

Commit

Permalink
net/wireless: use ARRAY_SIZE macro in radiotap.c
Browse files Browse the repository at this point in the history
Replace sizeof(rtap_namespace_sizes) / sizeof(rtap_namespace_sizes[0])
with ARRAY_SIZE(rtap_namespace_sizes) in net/wireless/radiotap.c

Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Nikitas Angelinas authored and John W. Linville committed Sep 14, 2010
1 parent bbce80e commit 9426231
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/wireless/radiotap.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* See COPYING for more details.
*/

#include <linux/kernel.h>
#include <net/cfg80211.h>
#include <net/ieee80211_radiotap.h>
#include <asm/unaligned.h>
Expand Down Expand Up @@ -45,7 +46,7 @@ static const struct radiotap_align_size rtap_namespace_sizes[] = {
};

static const struct ieee80211_radiotap_namespace radiotap_ns = {
.n_bits = sizeof(rtap_namespace_sizes) / sizeof(rtap_namespace_sizes[0]),
.n_bits = ARRAY_SIZE(rtap_namespace_sizes),
.align_size = rtap_namespace_sizes,
};

Expand Down

0 comments on commit 9426231

Please sign in to comment.