mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 04:53:44 +02:00
cleared warnings
This commit is contained in:
parent
5d72aabe17
commit
bf3591f593
2 changed files with 1 additions and 5 deletions
|
@ -47,9 +47,6 @@ impl CounterValue {
|
|||
pub fn to_u32(&self) -> u32 {
|
||||
self.0 as u32
|
||||
}
|
||||
pub fn get_initial_offer_counter() -> CounterValue {
|
||||
return CounterValue(1u32);
|
||||
}
|
||||
}
|
||||
|
||||
/// Incoming packet deduplication and replay protection window.
|
||||
|
@ -65,7 +62,6 @@ impl CounterWindow {
|
|||
Self(std::array::from_fn(|_| AtomicU32::new(u32::MAX)))
|
||||
}
|
||||
pub fn reset_for_initial_offer(&self) {
|
||||
let o = true;
|
||||
for i in 0..COUNTER_MAX_ALLOWED_OOO {
|
||||
self.0[i].store(0, Ordering::SeqCst)
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ mod tests {
|
|||
let mut history = Vec::new();
|
||||
|
||||
let w = CounterWindow::new();
|
||||
for i in 0..1000000 {
|
||||
for _i in 0..1000000 {
|
||||
let p = xorshift64(&mut rng) as f32/(u32::MAX as f32 + 1.0);
|
||||
let c;
|
||||
if p < 0.5 {
|
||||
|
|
Loading…
Add table
Reference in a new issue