File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,9 @@ impl TxDescriptor {
135
135
fn set_buffer1_len ( & mut self , len : usize ) {
136
136
unsafe {
137
137
self . desc . modify ( 1 , |w| {
138
- ( w & !TXDESC_1_TBS_MASK ) | ( ( len as u32 ) << TXDESC_1_TBS_SHIFT )
138
+ let masked_len = w & !TXDESC_1_TBS_MASK ;
139
+ let with_len = masked_len | ( ( len as u32 ) << TXDESC_1_TBS_SHIFT ) ;
140
+ with_len
139
141
} ) ;
140
142
}
141
143
}
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ impl<'ring> TxRing<'ring> {
80
80
81
81
/// If this returns `true`, the next `send` will succeed.
82
82
pub fn next_entry_available ( & self ) -> bool {
83
- ! self . entries [ self . next_entry ] . is_available ( )
83
+ self . entries [ self . next_entry ] . is_available ( )
84
84
}
85
85
86
86
/// Check if we can send the next TX entry.
You can’t perform that action at this time.
0 commit comments