From patchwork Sun Oct 30 15:36:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 1299 Return-Path: Received: from nick.hrz.tu-chemnitz.de (nick.hrz.tu-chemnitz.de [134.109.228.11]) by open-mesh.org (Postfix) with ESMTPS id CDC59600726 for ; Sun, 30 Oct 2011 16:36:30 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@tu-chemnitz.de; dkim-adsp=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=Message-Id:Date:Subject:Cc:To:From; bh=bP7H3vyaCBWbZEDgU1c1zZ8XqUP3GVVxZbts66IPqcQ=; b=eUuXrm91XVHfhjvNZZhu2JwNF4/dwVgR1ClB3odH43uZCPqp/CYZ/6rmYFxcgA9T1qD5kAX+sP6z/AKJoTGGE3AFcN9LhreviaJxBgQ9REsmJzB9OvJ+vGOO3VngcAaXblPcULCxlNBSbi6rNE7pAcA4mX6A4wFbR0kExHCAk54=; Received: from p57aa138b.dip0.t-ipconnect.de ([87.170.19.139] helo=pandem0nium) by nick.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RKXR0-0005OE-7B; Sun, 30 Oct 2011 16:36:30 +0100 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1RKXQz-0000vl-6Z; Sun, 30 Oct 2011 16:36:29 +0100 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 30 Oct 2011 16:36:20 +0100 Message-Id: <1319988980-3548-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 X-Spam-Score: -1.0 (-) X-Spam-Report: --- Textanalyse SpamAssassin 3.3.1 (-1.0 Punkte) Fragen an/questions to: Postmaster TU Chemnitz * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP --- Ende Textanalyse X-Scan-Signature: 6f6afa8c8a3e842be1e15c91a741a551 Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix style changes reported by cppcheck 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: Sun, 30 Oct 2011 15:36:31 -0000 cppcheck reported some style issues this patch fixes. Signed-off-by: Simon Wunderlich --- bat_iv_ogm.c | 2 +- routing.c | 2 +- soft-interface.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c index 3512e25..17b6dfa 100644 --- a/bat_iv_ogm.c +++ b/bat_iv_ogm.c @@ -990,7 +990,6 @@ static void bat_ogm_process(const struct ethhdr *ethhdr, if (is_my_orig) { unsigned long *word; - int offset; orig_neigh_node = get_orig_node(bat_priv, ethhdr->h_source); if (!orig_neigh_node) @@ -1002,6 +1001,7 @@ static void bat_ogm_process(const struct ethhdr *ethhdr, if (has_directlink_flag && compare_eth(if_incoming->net_dev->dev_addr, batman_ogm_packet->orig)) { + int offset; offset = if_incoming->if_num * NUM_WORDS; spin_lock_bh(&orig_neigh_node->ogm_cnt_lock); diff --git a/routing.c b/routing.c index ef24a72..3e97c2c 100644 --- a/routing.c +++ b/routing.c @@ -977,7 +977,6 @@ int recv_ucast_frag_packet(struct sk_buff *skb, struct hard_iface *recv_if) struct unicast_frag_packet *unicast_packet; int hdr_size = sizeof(*unicast_packet); struct sk_buff *new_skb = NULL; - int ret; if (check_unicast_packet(skb, hdr_size) < 0) return NET_RX_DROP; @@ -989,6 +988,7 @@ int recv_ucast_frag_packet(struct sk_buff *skb, struct hard_iface *recv_if) /* packet for me */ if (is_my_mac(unicast_packet->dest)) { + int ret; ret = frag_reassemble_skb(skb, bat_priv, &new_skb); diff --git a/soft-interface.c b/soft-interface.c index 45297c8..3ed6781 100644 --- a/soft-interface.c +++ b/soft-interface.c @@ -692,7 +692,6 @@ void interface_rx(struct net_device *soft_iface, struct vlan_ethhdr *vhdr; struct softif_neigh *curr_softif_neigh = NULL; short vid = -1; - int ret; /* check if enough space is available for pulling, and pull */ if (!pskb_may_pull(skb, hdr_size)) @@ -722,6 +721,7 @@ void interface_rx(struct net_device *soft_iface, */ curr_softif_neigh = softif_neigh_vid_get_selected(bat_priv, vid); if (curr_softif_neigh) { + int ret; skb_push(skb, hdr_size); unicast_packet = (struct unicast_packet *)skb->data;