Skip to content

Commit

Permalink
Bugfix in register_base.rs
Browse files Browse the repository at this point in the history
Function parameters were out of order
  • Loading branch information
frankjannis committed Jan 12, 2024
1 parent 1e34b0a commit 957ac08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion device/src/u3v/async_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ fn poll_completed(
let remaining = deadline.saturating_duration_since(Instant::now());
let timeval = libc::timeval {
tv_sec: remaining.as_secs().try_into().unwrap(),
tv_usec: remaining.subsec_micros().try_into().unwrap(),
tv_usec: remaining.subsec_micros().into(),
};

if libusb_try_lock_events(ctx.as_raw()) == 0_i32 {
Expand Down
2 changes: 1 addition & 1 deletion genapi/src/register_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl RegisterBase {
) -> GenApiResult<R> {
let length = self.length(device, store, cx)?;
let address = self.address(device, store, cx)?;
if let Some(cache) = cx.get_cache(nid, length, address) {
if let Some(cache) = cx.get_cache(nid, address, length) {
f(cache)
} else {
let mut buf = vec![0; length as usize];
Expand Down

0 comments on commit 957ac08

Please sign in to comment.