summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/platform/linux/udp.rs2
-rw-r--r--src/wireguard/router/anti_replay.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/linux/udp.rs b/src/platform/linux/udp.rs
index 7b4fa33..e76c2a8 100644
--- a/src/platform/linux/udp.rs
+++ b/src/platform/linux/udp.rs
@@ -118,7 +118,7 @@ fn setsockopt_int(
#[allow(non_snake_case)]
const fn CMSG_ALIGN(len: usize) -> usize {
- (((len) + mem::size_of::<u32>() - 1) & !(mem::size_of::<u32>() - 1))
+ ((len) + mem::size_of::<u32>() - 1) & !(mem::size_of::<u32>() - 1)
}
#[allow(non_snake_case)]
diff --git a/src/wireguard/router/anti_replay.rs b/src/wireguard/router/anti_replay.rs
index b0838bd..b47dea9 100644
--- a/src/wireguard/router/anti_replay.rs
+++ b/src/wireguard/router/anti_replay.rs
@@ -18,7 +18,7 @@ const REDUNDANT_BIT_SHIFTS: usize = 5;
const SIZE_OF_WORD: usize = mem::size_of::<Word>() * 8;
const BITMAP_BITLEN: usize = 2048;
-const BITMAP_LEN: usize = (BITMAP_BITLEN / SIZE_OF_WORD);
+const BITMAP_LEN: usize = BITMAP_BITLEN / SIZE_OF_WORD;
const BITMAP_INDEX_MASK: u64 = BITMAP_LEN as u64 - 1;
const BITMAP_LOC_MASK: u64 = (SIZE_OF_WORD - 1) as u64;
const WINDOW_SIZE: u64 = (BITMAP_BITLEN - SIZE_OF_WORD) as u64;