mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 13:22:07 +00:00
clean declare structs (#3929)
This commit is contained in:
@@ -169,8 +169,7 @@ pub const ServerConfig = struct {
|
||||
const log = Output.scoped(.SSLConfig, false);
|
||||
|
||||
pub fn asUSockets(this_: ?SSLConfig) uws.us_bun_socket_context_options_t {
|
||||
var ctx_opts: uws.us_bun_socket_context_options_t = undefined;
|
||||
@memset(@as([*]u8, @ptrCast(&ctx_opts))[0..@sizeOf(uws.us_bun_socket_context_options_t)], 0);
|
||||
var ctx_opts: uws.us_bun_socket_context_options_t = .{};
|
||||
|
||||
if (this_) |ssl_config| {
|
||||
if (ssl_config.key_file_name != null)
|
||||
|
||||
@@ -319,9 +319,7 @@ fn NewHTTPContext(comptime ssl: bool) type {
|
||||
}
|
||||
|
||||
pub fn init(this: *@This()) !void {
|
||||
var opts: uws.us_socket_context_options_t = undefined;
|
||||
const size = @sizeOf(uws.us_socket_context_options_t);
|
||||
@memset(@as([*]u8, @ptrCast(&opts))[0..size], 0);
|
||||
var opts: uws.us_socket_context_options_t = .{};
|
||||
this.us_socket_context = uws.us_create_socket_context(ssl_int, http_thread.loop, @sizeOf(usize), opts).?;
|
||||
if (comptime ssl) {
|
||||
this.sslCtx().setup();
|
||||
|
||||
Reference in New Issue
Block a user