Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: bjorn3 <[email protected]>
  • Loading branch information
folkertdev and bjorn3 authored Nov 12, 2024
1 parent c18a11e commit 4e96fbd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bzip2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ unsafe fn testStream(zStream: *mut FILE) -> bool {
break 'errhandler;
}

let mut unusedTmpV: *mut libc::c_void = std::ptr::null_mut::<libc::c_void>();
let mut unusedTmpV = std::ptr::null_mut();
BZ2_bzReadGetUnused(&mut bzerr, bzf, &mut unusedTmpV, &mut nUnused);
if bzerr != libbzip2_rs_sys::BZ_OK {
panic_str("test:bzReadGetUnused");
Expand All @@ -552,8 +552,7 @@ unsafe fn testStream(zStream: *mut FILE) -> bool {
if ferror(zStream) != 0 {
ioError() // diverges
}
ret = fclose(zStream);
if ret == libc::EOF {
if fclose(zStream) == libc::EOF {
ioError() // diverges
}

Expand Down

0 comments on commit 4e96fbd

Please sign in to comment.