batman-adv: checkpatch - else is not generally useful after a break or return
authorAntonio Quartulli <antonio@meshcoding.com>
Mon, 1 Sep 2014 12:37:25 +0000 (14:37 +0200)
committerAntonio Quartulli <antonio@meshcoding.com>
Wed, 7 Jan 2015 16:21:55 +0000 (17:21 +0100)
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
net/batman-adv/bitarray.h
net/batman-adv/fragmentation.h
net/batman-adv/network-coding.c
net/batman-adv/translation-table.c

index cc2407351d367f74fe9f288fdff79fe8db95f7c3..2acaafe60188711ad5f2d704b99c00435b0ee40b 100644 (file)
@@ -29,8 +29,7 @@ static inline int batadv_test_bit(const unsigned long *seq_bits,
        diff = last_seqno - curr_seqno;
        if (diff < 0 || diff >= BATADV_TQ_LOCAL_WINDOW_SIZE)
                return 0;
-       else
-               return test_bit(diff, seq_bits) != 0;
+       return test_bit(diff, seq_bits) != 0;
 }
 
 /* turn corresponding bit on, so we can remember that we got the packet */
index 5d7a0e66a22b35d54baf5910f8b923981d11c0b5..d848cf6676a2e4b7853a263f496d1ff0a0260a86 100644 (file)
@@ -41,8 +41,7 @@ batadv_frag_check_entry(struct batadv_frag_table_entry *frags_entry)
        if (!hlist_empty(&frags_entry->head) &&
            batadv_has_timed_out(frags_entry->timestamp, BATADV_FRAG_TIMEOUT))
                return true;
-       else
-               return false;
+       return false;
 }
 
 #endif /* _NET_BATMAN_ADV_FRAGMENTATION_H_ */
index fab47f1f3ef9752a4fc6e2caba504631efb510d6..127cc4d7380a1e7186aee6cc9064199ef48ff9bb 100644 (file)
@@ -1212,8 +1212,7 @@ static bool batadv_nc_skb_coding_possible(struct sk_buff *skb,
 {
        if (BATADV_SKB_CB(skb)->decoded && !batadv_compare_eth(dst, src))
                return false;
-       else
-               return true;
+       return true;
 }
 
 /**
index 5f59e7f899a0179a544764207468c6b4b336a237..38a804e1db0acab988b3a6e5658a663153ed5a84 100644 (file)
@@ -2769,9 +2769,8 @@ static bool batadv_send_tt_response(struct batadv_priv *bat_priv,
 {
        if (batadv_is_my_mac(bat_priv, req_dst))
                return batadv_send_my_tt_response(bat_priv, tt_data, req_src);
-       else
-               return batadv_send_other_tt_response(bat_priv, tt_data,
-                                                    req_src, req_dst);
+       return batadv_send_other_tt_response(bat_priv, tt_data, req_src,
+                                            req_dst);
 }
 
 static void _batadv_tt_update_changes(struct batadv_priv *bat_priv,