diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-07-08 17:13:15 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-08-23 14:20:20 +0200 |
commit | bbb1f90efba89b31fc5e329d5fcaf10aca99212b (patch) | |
tree | db2645f7068d5da5b501559e6a2972c20f361082 /net/batman-adv/unicast.c | |
parent | batman-adv: Use BIT(x) macro to calculate bit positions (diff) | |
download | linux-bbb1f90efba89b31fc5e329d5fcaf10aca99212b.tar.xz linux-bbb1f90efba89b31fc5e329d5fcaf10aca99212b.zip |
batman-adv: Don't break statements after assignment operator
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/unicast.c')
-rw-r--r-- | net/batman-adv/unicast.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c index 00164645b3f7..d7904bdb1ff9 100644 --- a/net/batman-adv/unicast.c +++ b/net/batman-adv/unicast.c @@ -121,6 +121,7 @@ batadv_frag_search_packet(struct list_head *head, { struct batadv_frag_packet_list_entry *tfp; struct batadv_unicast_frag_packet *tmp_up = NULL; + int is_head_tmp, is_head; uint16_t search_seqno; if (up->flags & BATADV_UNI_FRAG_HEAD) @@ -128,6 +129,8 @@ batadv_frag_search_packet(struct list_head *head, else search_seqno = ntohs(up->seqno)-1; + is_head = !!(up->flags & BATADV_UNI_FRAG_HEAD); + list_for_each_entry(tfp, head, list) { if (!tfp->skb) @@ -139,9 +142,8 @@ batadv_frag_search_packet(struct list_head *head, tmp_up = (struct batadv_unicast_frag_packet *)tfp->skb->data; if (tfp->seqno == search_seqno) { - - if ((tmp_up->flags & BATADV_UNI_FRAG_HEAD) != - (up->flags & BATADV_UNI_FRAG_HEAD)) + is_head_tmp = !!(tmp_up->flags & BATADV_UNI_FRAG_HEAD); + if (is_head_tmp != is_head) return tfp; else goto mov_tail; @@ -334,8 +336,7 @@ find_router: /* copy the destination for faster routing */ memcpy(unicast_packet->dest, orig_node->orig, ETH_ALEN); /* set the destination tt version number */ - unicast_packet->ttvn = - (uint8_t)atomic_read(&orig_node->last_ttvn); + unicast_packet->ttvn = (uint8_t)atomic_read(&orig_node->last_ttvn); /* inform the destination node that we are still missing a correct route * for this client. The destination will receive this packet and will |