batctl: use ETH_ALEN instead of hardcoded numeric constants
Commit Message
In tcpdump.h the numeric constants 6 is usedinstead of the more portable (and
readable) define ETH_ALEN. This patch substitute any hardcoded value with such
define.
Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
tcpdump.h | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
Comments
On Saturday, February 04, 2012 23:52:12 Antonio Quartulli wrote:
> In tcpdump.h the numeric constants 6 is usedinstead of the more portable
> (and readable) define ETH_ALEN. This patch substitute any hardcoded value
> with such define.
Applied in revision 64ab6b5.
Thanks,
Marek
@@ -21,6 +21,7 @@
#include <netpacket/packet.h>
+#include <net/ethernet.h>
#include "list-batman.h"
#ifndef ARPHRD_IEEE80211_PRISM
@@ -65,11 +66,11 @@ struct vlanhdr {
struct ieee80211_hdr {
u_int16_t frame_control;
u_int16_t duration_id;
- u_int8_t addr1[6];
- u_int8_t addr2[6];
- u_int8_t addr3[6];
+ u_int8_t addr1[ETH_ALEN];
+ u_int8_t addr2[ETH_ALEN];
+ u_int8_t addr3[ETH_ALEN];
u_int16_t seq_ctrl;
- u_int8_t addr4[6];
+ u_int8_t addr4[ETH_ALEN];
} __attribute__ ((packed));
struct radiotap_header {