From ea1d173f24bce5cd64a8c6a09711d72b1dca24d8 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sat, 12 Oct 2024 01:13:49 +0000 Subject: [PATCH] added zeroinit for c struct --- src/main.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.zig b/src/main.zig index 24c3079..c2f93aa 100644 --- a/src/main.zig +++ b/src/main.zig @@ -26,7 +26,7 @@ pub fn main() void { var status: hlo.hailo_status = undefined; var vdevice : hlo.hailo_vdevice = undefined; var hef : hlo.hailo_hef = undefined; - var device_params: hlo.hailo_vdevice_params_t = undefined; + var device_params: hlo.hailo_vdevice_params_t = std.mem.zeroInit(hlo.hailo_vdevice_params_t, .{}); var network_group: hlo.hailo_configured_network_group = undefined; const input_vstream_params : [max_edge_layers]hlo.hailo_input_vstream_params_by_name_t = undefined; const output_vstream_params : [max_edge_layers]hlo.hailo_output_vstream_params_by_name_t = undefined; @@ -35,7 +35,6 @@ pub fn main() void { var input_vstream_size : usize = max_edge_layers; var output_vstream_size : usize = max_edge_layers; - @memset(device_params, 0); @memset(&input_vstream_params, 0); @memset(&output_vstream_params, 0);