Commit 3b29a72b3b

LemonBoy <thatlemon@gmail.com>
2020-02-29 23:08:57
Use .len instead of @sizeOf
1 parent 84549b3
Changed files (1)
lib
std
lib/std/zig/system.zig
@@ -225,7 +225,7 @@ pub const NativeTargetInfo = struct {
                 },
                 .macosx => {
                     var product_version: [32]u8 = undefined;
-                    var size: usize = @sizeOf(@TypeOf(product_version));
+                    var size: usize = product_version.len;
 
                     // The osproductversion sysctl was introduced first with
                     // High Sierra, thankfully that's also the baseline that Zig