From patchwork Sat Feb 4 15:52:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1538 Return-Path: Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by open-mesh.org (Postfix) with ESMTPS id 0F1C660083F for ; Sat, 4 Feb 2012 16:53:06 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@autistici.org; dkim-adsp=pass Received: from [217.150.252.179] (confino [217.150.252.179]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 191DFC8642; Sat, 4 Feb 2012 15:53:05 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org 191DFC8642 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1328370786; bh=KcDqkbcNMizFKz7WCalG5kg/73ASFoLXIY7d4/pqB1c=; h=From:To:Cc:Subject:Date:Message-Id; b=X/+2v8wXiuWlzYyOvQ+3M6S1N3yUcVYczkfcIFNK/8NZiLxHWAdSMghVGVoW0+bY3 V+5CXUXveG1IvYXHTAQEib805P8ci0q20VT8/YHX5jVBUIAVkxCTnnu8a1OHzyAuPY eWEUH8zedC4dai2YxNYsi+c3b6ZQjJpp880J7QME= From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 4 Feb 2012 16:52:12 +0100 Message-Id: <1328370732-25571-1-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 Subject: [B.A.T.M.A.N.] [PATCH] batctl: use ETH_ALEN instead of hardcoded numeric constants X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2012 15:53:07 -0000 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 Signed-off-by: Antonio Quartulli --- tcpdump.h | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tcpdump.h b/tcpdump.h index 2a2cc0a..96989b4 100644 --- a/tcpdump.h +++ b/tcpdump.h @@ -21,6 +21,7 @@ #include +#include #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 {