Skip to content

Commit 0b993f0

Browse files
committed
librustls: remove duplicative out param null check
In `rustls_client_connection_new` we're using the pattern of constructing a `&mut *mut` out reference from a `*mut *mut` pointer input using the `try_mut_from_ptr_ptr!` macro, which checks that the param isn't `NULL`. This means an earlier explicit check isn't needed and can be removed for clarity.
1 parent b02548a commit 0b993f0

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

librustls/src/client.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -762,9 +762,6 @@ impl rustls_client_config {
762762
conn_out: *mut *mut rustls_connection,
763763
) -> rustls_result {
764764
ffi_panic_boundary! {
765-
if conn_out.is_null() {
766-
return rustls_result::NullParameter;
767-
}
768765
let server_name = unsafe {
769766
if server_name.is_null() {
770767
return rustls_result::NullParameter;

0 commit comments

Comments
 (0)