diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-24 19:55:52 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-30 18:07:28 +0200 |
commit | f1aaa8a3a5fe783dcb9008fa722bac755751a719 (patch) | |
tree | 135bbdf36401524058bdb2e397a24378c954ab9d /src | |
parent | 672b76a098b99102a46712b1d982f550f97806f2 (diff) |
style: spaces after for loops
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/compat/compat.h | 2 | ||||
-rw-r--r-- | src/data.c | 4 | ||||
-rw-r--r-- | src/device.c | 2 | ||||
-rw-r--r-- | src/hashtables.c | 8 | ||||
-rw-r--r-- | src/peer.c | 4 | ||||
-rw-r--r-- | src/selftest/routingtable.h | 8 | ||||
-rw-r--r-- | src/send.c | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index 31ff0b5..f9cfc08 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -141,7 +141,7 @@ static inline void netif_keep_dst(struct net_device *dev) typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \ if (pcpu_stats) { \ int __cpu; \ - for_each_possible_cpu(__cpu) { \ + for_each_possible_cpu (__cpu) { \ typeof(type) *stat; \ stat = per_cpu_ptr(pcpu_stats, __cpu); \ u64_stats_init(&stat->syncp); \ @@ -218,7 +218,7 @@ static inline void queue_encrypt_reset(struct sk_buff_head *queue, struct noise_ { struct sk_buff *skb, *tmp; bool have_simd = chacha20poly1305_init_simd(); - skb_queue_walk_safe(queue, skb, tmp) { + skb_queue_walk_safe (queue, skb, tmp) { if (unlikely(!skb_encrypt(skb, keypair, have_simd))) { __skb_unlink(skb, queue); kfree_skb(skb); @@ -273,7 +273,7 @@ int packet_create_data(struct sk_buff_head *queue, struct wireguard_peer *peer) goto err_rcu; rcu_read_unlock_bh(); - skb_queue_walk(queue, skb) { + skb_queue_walk (queue, skb) { if (unlikely(!get_encryption_nonce(&PACKET_CB(skb)->nonce, &keypair->sending))) goto err; diff --git a/src/device.c b/src/device.c index a06750a..a4a1104 100644 --- a/src/device.c +++ b/src/device.c @@ -307,7 +307,7 @@ static int newlink(struct net *src_net, struct net_device *dev, struct nlattr *t wg->incoming_handshakes_worker = alloc_percpu(struct handshake_worker); if (!wg->incoming_handshakes_worker) goto error_2; - for_each_possible_cpu(cpu) { + for_each_possible_cpu (cpu) { per_cpu_ptr(wg->incoming_handshakes_worker, cpu)->wg = wg; INIT_WORK(&per_cpu_ptr(wg->incoming_handshakes_worker, cpu)->work, packet_process_queued_handshake_packets); } diff --git a/src/hashtables.c b/src/hashtables.c index efd7111..db97f7e 100644 --- a/src/hashtables.c +++ b/src/hashtables.c @@ -37,7 +37,7 @@ struct wireguard_peer *pubkey_hashtable_lookup(struct pubkey_hashtable *table, c { struct wireguard_peer *iter_peer, *peer = NULL; rcu_read_lock_bh(); - hlist_for_each_entry_rcu_bh(iter_peer, pubkey_bucket(table, pubkey), pubkey_hash) { + hlist_for_each_entry_rcu_bh (iter_peer, pubkey_bucket(table, pubkey), pubkey_hash) { if (!memcmp(pubkey, iter_peer->handshake.remote_static, NOISE_PUBLIC_KEY_LEN)) { peer = iter_peer; break; @@ -74,7 +74,7 @@ __le32 index_hashtable_insert(struct index_hashtable *table, struct index_hashta search_unused_slot: /* First we try to find an unused slot, randomly, while unlocked. */ entry->index = (__force __le32)get_random_u32(); - hlist_for_each_entry_rcu_bh(existing_entry, index_bucket(table, entry->index), index_hash) { + hlist_for_each_entry_rcu_bh (existing_entry, index_bucket(table, entry->index), index_hash) { if (existing_entry->index == entry->index) goto search_unused_slot; /* If it's already in use, we continue searching. */ } @@ -82,7 +82,7 @@ search_unused_slot: /* Once we've found an unused slot, we lock it, and then double-check * that nobody else stole it from us. */ spin_lock_bh(&table->lock); - hlist_for_each_entry_rcu_bh(existing_entry, index_bucket(table, entry->index), index_hash) { + hlist_for_each_entry_rcu_bh (existing_entry, index_bucket(table, entry->index), index_hash) { if (existing_entry->index == entry->index) { spin_unlock_bh(&table->lock); goto search_unused_slot; /* If it was stolen, we start over. */ @@ -118,7 +118,7 @@ struct index_hashtable_entry *index_hashtable_lookup(struct index_hashtable *tab { struct index_hashtable_entry *iter_entry, *entry = NULL; rcu_read_lock_bh(); - hlist_for_each_entry_rcu_bh(iter_entry, index_bucket(table, index), index_hash) { + hlist_for_each_entry_rcu_bh (iter_entry, index_bucket(table, index), index_hash) { if (iter_entry->index == index && (iter_entry->type & type_mask)) { entry = iter_entry; break; @@ -112,7 +112,7 @@ void peer_remove_all(struct wireguard_device *wg) { struct wireguard_peer *peer, *temp; lockdep_assert_held(&wg->device_update_lock); - list_for_each_entry_safe(peer, temp, &wg->peer_list, peer_list) + list_for_each_entry_safe (peer, temp, &wg->peer_list, peer_list) peer_remove(peer); } @@ -121,7 +121,7 @@ unsigned int peer_total_count(struct wireguard_device *wg) unsigned int i = 0; struct wireguard_peer *peer; lockdep_assert_held(&wg->device_update_lock); - list_for_each_entry(peer, &wg->peer_list, peer_list) + list_for_each_entry (peer, &wg->peer_list, peer_list) ++i; return i; } diff --git a/src/selftest/routingtable.h b/src/selftest/routingtable.h index 0915e65..26ec5e0 100644 --- a/src/selftest/routingtable.h +++ b/src/selftest/routingtable.h @@ -65,7 +65,7 @@ static void horrible_routing_table_free(struct horrible_routing_table *table) { struct hlist_node *h; struct horrible_routing_table_node *node; - hlist_for_each_entry_safe(node, h, &table->head, table) { + hlist_for_each_entry_safe (node, h, &table->head, table) { hlist_del(&node->table); kfree(node); }; @@ -112,7 +112,7 @@ static void horrible_insert_ordered(struct horrible_routing_table *table, struct { struct horrible_routing_table_node *other = NULL, *where = NULL; uint8_t my_cidr = horrible_mask_to_cidr(node->mask); - hlist_for_each_entry(other, &table->head, table) { + hlist_for_each_entry (other, &table->head, table) { if (!memcmp(&other->mask, &node->mask, sizeof(union nf_inet_addr)) && !memcmp(&other->ip, &node->ip, sizeof(union nf_inet_addr)) && other->ip_version == node->ip_version) { @@ -161,7 +161,7 @@ static void *horrible_routing_table_lookup_v4(struct horrible_routing_table *tab { struct horrible_routing_table_node *node; void *ret = NULL; - hlist_for_each_entry(node, &table->head, table) { + hlist_for_each_entry (node, &table->head, table) { if (node->ip_version != 4) continue; if (horrible_match_v4(node, ip)) { @@ -175,7 +175,7 @@ static void *horrible_routing_table_lookup_v6(struct horrible_routing_table *tab { struct horrible_routing_table_node *node; void *ret = NULL; - hlist_for_each_entry(node, &table->head, table) { + hlist_for_each_entry (node, &table->head, table) { if (node->ip_version != 6) continue; if (horrible_match_v6(node, ip)) { @@ -127,7 +127,7 @@ void packet_create_data_done(struct sk_buff_head *queue, struct wireguard_peer * return; timers_any_authenticated_packet_traversal(peer); - skb_queue_walk_safe(queue, skb, tmp) { + skb_queue_walk_safe (queue, skb, tmp) { is_keepalive = skb->len == message_data_len(0); if (likely(!socket_send_skb_to_peer(peer, skb, PACKET_CB(skb)->ds) && !is_keepalive)) data_sent = true; |