diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-08-01 22:47:26 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-08-02 14:40:43 +0200 |
commit | 107735eaea0f48c1f5bfc0a6ca82f1879a850b98 (patch) | |
tree | d7197eb1feba29dd90b5363c20ef340d15ff4ec2 | |
parent | blake2s: satisfy sparse (diff) | |
download | wireguard-monolithic-historical-107735eaea0f48c1f5bfc0a6ca82f1879a850b98.tar.xz wireguard-monolithic-historical-107735eaea0f48c1f5bfc0a6ca82f1879a850b98.zip |
routingtable: unbloat BUG()
Really isn't necessary.
-rw-r--r-- | src/routingtable.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/routingtable.c b/src/routingtable.c index a6abb61..8db3efe 100644 --- a/src/routingtable.c +++ b/src/routingtable.c @@ -119,18 +119,17 @@ static void walk_remove_by_peer(struct routing_table_node __rcu **top, struct wi #undef deref #undef push -static inline unsigned int fls128(u64 a, u64 b) +static __always_inline unsigned int fls128(u64 a, u64 b) { return a ? fls64(a) + 64 : fls64(b); } -static inline u8 common_bits(const struct routing_table_node *node, const u8 *key, u8 bits) +static __always_inline u8 common_bits(const struct routing_table_node *node, const u8 *key, u8 bits) { if (bits == 32) return 32 - fls(be32_to_cpu(*(const __be32 *)node->bits ^ *(const __be32 *)key)); else if (bits == 128) return 128 - fls128(be64_to_cpu(*(const __be64 *)&node->bits[0] ^ *(const __be64 *)&key[0]), be64_to_cpu(*(const __be64 *)&node->bits[8] ^ *(const __be64 *)&key[8])); - BUG(); return 0; } |