@@ -67,9 +67,9 @@ pub struct BaseCode {
6767 udp_read : unsafe extern "efiapi" fn (
6868 this : & Self ,
6969 op_flags : UdpOpFlags ,
70- dest_ip : Option < & mut IpAddress > ,
70+ dest_ip : * mut uefi_raw :: IpAddress ,
7171 dest_port : Option < & mut u16 > ,
72- src_ip : Option < & mut IpAddress > ,
72+ src_ip : * mut uefi_raw :: IpAddress ,
7373 src_port : Option < & mut u16 > ,
7474 header_size : Option < & usize > ,
7575 header_ptr : * mut c_void ,
@@ -519,9 +519,9 @@ impl BaseCode {
519519 ( self . udp_read ) (
520520 self ,
521521 op_flags,
522- dest_ip,
522+ opt_ip_addr_to_ptr_mut ( dest_ip) ,
523523 dest_port,
524- src_ip,
524+ opt_ip_addr_to_ptr_mut ( src_ip) ,
525525 src_port,
526526 header_size,
527527 header_ptr,
@@ -641,6 +641,11 @@ fn opt_ip_addr_to_ptr(arg: Option<&IpAddress>) -> *const uefi_raw::IpAddress {
641641 arg. map ( |arg| arg. as_raw_ptr ( ) ) . unwrap_or_else ( null)
642642}
643643
644+ /// Convert an `Option<&mut IpAddress>` to a `*mut uefi_raw::IpAddress`.
645+ fn opt_ip_addr_to_ptr_mut ( arg : Option < & mut IpAddress > ) -> * mut uefi_raw:: IpAddress {
646+ arg. map ( |arg| arg. as_raw_ptr_mut ( ) ) . unwrap_or_else ( null_mut)
647+ }
648+
644649opaque_type ! {
645650 /// Opaque type that should be used to represent a pointer to a [`DiscoverInfo`] in
646651 /// foreign function interfaces. This type produces a thin pointer, unlike
0 commit comments