Skip to content

Commit b18f7d6

Browse files
committed
SSL_CIPHER_description: remove dead store of size
1 parent d8054dc commit b18f7d6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/entry.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,9 +1571,10 @@ entry! {
15711571
entry! {
15721572
pub fn _SSL_CIPHER_description(
15731573
cipher: *const SSL_CIPHER,
1574-
mut buf: *mut c_char,
1575-
mut size: c_int,
1574+
buf: *mut c_char,
1575+
size: c_int,
15761576
) -> *mut c_char {
1577+
let mut buf = buf;
15771578
let description = try_ref_from_ptr!(cipher).description;
15781579
let required_len = description.to_bytes_with_nul().len();
15791580

@@ -1587,13 +1588,12 @@ entry! {
15871588
return allocd;
15881589
}
15891590
buf = allocd;
1590-
size = required_len as i32;
15911591
} else if size < (required_len as i32) {
15921592
return ptr::null_mut();
15931593
}
15941594

15951595
unsafe {
1596-
ptr::copy_nonoverlapping(description.as_ptr(), buf, required_len as usize);
1596+
ptr::copy_nonoverlapping(description.as_ptr(), buf, required_len);
15971597
};
15981598
buf
15991599
}

0 commit comments

Comments
 (0)