We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b59c785 commit f531926Copy full SHA for f531926
sys/lib/libbenchnet/src/packettool.rs
@@ -59,7 +59,7 @@ pub fn fix_udp_checksum(frame: &mut [u8]) {
59
#[inline(always)]
60
fn fnv_a(data: &[u8], state: &mut u64) {
61
for byte in data.iter() {
62
- *state *= 0x100000001b3;
+ *state = (*state).wrapping_mul(0x100000001b3);
63
*state ^= u64::from(*byte);
64
}
65
@@ -92,7 +92,7 @@ pub fn get_flowhash(frame: &[u8]) -> Option<usize> {
92
return None;
93
94
*/
95
- state *= 0x100000001b3;
+ state = state.wrapping_mul(0x100000001b3);
96
state ^= u64::from(proto);
97
98
// proto.hash(&mut h1);
0 commit comments