| author | |
| committer | |
| log | e313584a488dde3b4edb2f2e6e97a646596fcbf3 |
| tree | c7757c9dd27ea9610861e90075cab7b1d3ba6205 |
| parent | 17255bed41a4b2c31a3f4342d51aa80a6f9d6b0b |
4 files changed, 5 insertions(+), 5 deletions(-)
lib/std/os/uefi/protocols/device_path_protocol.zig+1-1| ... | @@ -48,7 +48,7 @@ pub const DevicePathProtocol = extern struct { | ... | @@ -48,7 +48,7 @@ pub const DevicePathProtocol = extern struct { |
| 48 | // DevicePathProtocol for the extra node before the end | 48 | // DevicePathProtocol for the extra node before the end |
| 49 | var buf = try allocator.alloc(u8, path_size + 2 * (path.len + 1) + @sizeOf(DevicePathProtocol)); | 49 | var buf = try allocator.alloc(u8, path_size + 2 * (path.len + 1) + @sizeOf(DevicePathProtocol)); |
| 50 | 50 | ||
| 51 | @memcpy(buf[0..path_size.len], @as([*]const u8, @ptrCast(self))[0..path_size]); | 51 | @memcpy(buf[0..path_size], @as([*]const u8, @ptrCast(self))[0..path_size]); |
| 52 | 52 | ||
| 53 | // Pointer to the copy of the end node of the current chain, which is - 4 from the buffer | 53 | // Pointer to the copy of the end node of the current chain, which is - 4 from the buffer |
| 54 | // as the end node itself is 4 bytes (type: u8 + subtype: u8 + length: u16). | 54 | // as the end node itself is 4 bytes (type: u8 + subtype: u8 + length: u16). |
lib/std/os/uefi/protocols/hii.zig+1-1| ... | @@ -39,7 +39,7 @@ pub const HIISimplifiedFontPackage = extern struct { | ... | @@ -39,7 +39,7 @@ pub const HIISimplifiedFontPackage = extern struct { |
| 39 | number_of_wide_glyphs: u16, | 39 | number_of_wide_glyphs: u16, |
| 40 | 40 | ||
| 41 | pub fn getNarrowGlyphs(self: *HIISimplifiedFontPackage) []NarrowGlyph { | 41 | pub fn getNarrowGlyphs(self: *HIISimplifiedFontPackage) []NarrowGlyph { |
| 42 | return @as([*]NarrowGlyph, @ptrCast(@as([*]u8, @ptrCast(self)) + @sizeOf(HIISimplifiedFontPackage)))[0..self.number_of_narrow_glyphs]; | 42 | return @as([*]NarrowGlyph, @ptrCast(@alignCast(@as([*]u8, @ptrCast(self)) + @sizeOf(HIISimplifiedFontPackage))))[0..self.number_of_narrow_glyphs]; |
| 43 | } | 43 | } |
| 44 | }; | 44 | }; |
| 45 | 45 |
lib/std/os/uefi/protocols/managed_network_protocol.zig+1-1| ... | @@ -119,7 +119,7 @@ pub const ManagedNetworkTransmitData = extern struct { | ... | @@ -119,7 +119,7 @@ pub const ManagedNetworkTransmitData = extern struct { |
| 119 | fragment_count: u16, | 119 | fragment_count: u16, |
| 120 | 120 | ||
| 121 | pub fn getFragments(self: *ManagedNetworkTransmitData) []ManagedNetworkFragmentData { | 121 | pub fn getFragments(self: *ManagedNetworkTransmitData) []ManagedNetworkFragmentData { |
| 122 | return @as([*]ManagedNetworkFragmentData, @ptrCast(@as([*]u8, @ptrCast(self)) + @sizeOf(ManagedNetworkTransmitData)))[0..self.fragment_count]; | 122 | return @as([*]ManagedNetworkFragmentData, @ptrCast(@alignCast(@as([*]u8, @ptrCast(self)) + @sizeOf(ManagedNetworkTransmitData))))[0..self.fragment_count]; |
| 123 | } | 123 | } |
| 124 | }; | 124 | }; |
| 125 | 125 |
lib/std/os/uefi/protocols/udp6_protocol.zig+2-2| ... | @@ -88,7 +88,7 @@ pub const Udp6ReceiveData = extern struct { | ... | @@ -88,7 +88,7 @@ pub const Udp6ReceiveData = extern struct { |
| 88 | fragment_count: u32, | 88 | fragment_count: u32, |
| 89 | 89 | ||
| 90 | pub fn getFragments(self: *Udp6ReceiveData) []Udp6FragmentData { | 90 | pub fn getFragments(self: *Udp6ReceiveData) []Udp6FragmentData { |
| 91 | return @as([*]Udp6FragmentData, @ptrCast(@as([*]u8, @ptrCast(self)) + @sizeOf(Udp6ReceiveData)))[0..self.fragment_count]; | 91 | return @as([*]Udp6FragmentData, @ptrCast(@alignCast(@as([*]u8, @ptrCast(self)) + @sizeOf(Udp6ReceiveData))))[0..self.fragment_count]; |
| 92 | } | 92 | } |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| ... | @@ -98,7 +98,7 @@ pub const Udp6TransmitData = extern struct { | ... | @@ -98,7 +98,7 @@ pub const Udp6TransmitData = extern struct { |
| 98 | fragment_count: u32, | 98 | fragment_count: u32, |
| 99 | 99 | ||
| 100 | pub fn getFragments(self: *Udp6TransmitData) []Udp6FragmentData { | 100 | pub fn getFragments(self: *Udp6TransmitData) []Udp6FragmentData { |
| 101 | return @as([*]Udp6FragmentData, @ptrCast(@as([*]u8, @ptrCast(self)) + @sizeOf(Udp6TransmitData)))[0..self.fragment_count]; | 101 | return @as([*]Udp6FragmentData, @ptrCast(@alignCast(@as([*]u8, @ptrCast(self)) + @sizeOf(Udp6TransmitData))))[0..self.fragment_count]; |
| 102 | } | 102 | } |
| 103 | }; | 103 | }; |
| 104 | 104 |