diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-03 06:18:45 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-03 06:20:48 +0200 |
commit | 452dc76c606d47dc248f846f1202d708a7245f5e (patch) | |
tree | eb5fa1399b2a75f1681cdf0d5555e5babfe0088b /src/routingtable.c | |
parent | 9a93bd7a398acd6f693f6a8332fc0dc6e410a2e5 (diff) |
global: satisfy bitshift pedantry
Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/routingtable.c')
-rw-r--r-- | src/routingtable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routingtable.c b/src/routingtable.c index c4e343f..6fdad8a 100644 --- a/src/routingtable.c +++ b/src/routingtable.c @@ -14,7 +14,7 @@ struct routing_table_node { static inline void copy_and_assign_cidr(struct routing_table_node *node, const u8 *src, u8 cidr) { memcpy(node->bits, src, (cidr + 7) / 8); - node->bits[(cidr + 7) / 8 - 1] &= 0xff << ((8 - (cidr % 8)) % 8); + node->bits[(cidr + 7) / 8 - 1] &= 0xffU << ((8 - (cidr % 8)) % 8); node->cidr = cidr; node->bit_at_a = cidr / 8; node->bit_at_b = 7 - (cidr % 8); |