diff --git a/bzip2.rs b/bzip2.rs index dd350f8dc..6577880ed 100644 --- a/bzip2.rs +++ b/bzip2.rs @@ -527,7 +527,7 @@ unsafe fn testStream(zStream: *mut FILE) -> bool { break 'errhandler; } - let mut unusedTmpV: *mut libc::c_void = std::ptr::null_mut::(); + 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"); @@ -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 }