Skip to content

Commit 4e96fbd

Browse files
folkertdevbjorn3
andauthored
Apply suggestions from code review
Co-authored-by: bjorn3 <[email protected]>
1 parent c18a11e commit 4e96fbd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bzip2.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ unsafe fn testStream(zStream: *mut FILE) -> bool {
527527
break 'errhandler;
528528
}
529529

530-
let mut unusedTmpV: *mut libc::c_void = std::ptr::null_mut::<libc::c_void>();
530+
let mut unusedTmpV = std::ptr::null_mut();
531531
BZ2_bzReadGetUnused(&mut bzerr, bzf, &mut unusedTmpV, &mut nUnused);
532532
if bzerr != libbzip2_rs_sys::BZ_OK {
533533
panic_str("test:bzReadGetUnused");
@@ -552,8 +552,7 @@ unsafe fn testStream(zStream: *mut FILE) -> bool {
552552
if ferror(zStream) != 0 {
553553
ioError() // diverges
554554
}
555-
ret = fclose(zStream);
556-
if ret == libc::EOF {
555+
if fclose(zStream) == libc::EOF {
557556
ioError() // diverges
558557
}
559558

0 commit comments

Comments
 (0)