Skip to content

Commit

Permalink
Initialize variables, fix core-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Jul 4, 2023
1 parent cbc1540 commit b10b534
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/network/dns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ SW_API std::string swoole_name_resolver_lookup(const std::string &host_name, Nam
if (swoole_coroutine_is_in()) {
return System::gethostbyname(host_name, ctx->type, ctx->timeout);
} else {
char addr[INET6_ADDRSTRLEN];
char addr[INET6_ADDRSTRLEN] = {};
if (swoole::network::gethostbyname(ctx->type, host_name.c_str(), sw_tg_buffer()->str) < 0) {
swoole_set_last_error(SW_ERROR_DNSLOOKUP_RESOLVE_FAILED);
return "";
Expand Down

0 comments on commit b10b534

Please sign in to comment.