net/Resolver: replace memset(0) with empty C++ initializer list
This commit is contained in:
parent
991bbea875
commit
a784c8b1ae
@ -149,8 +149,7 @@ Resolve(const char *host_and_port, int default_port,
|
|||||||
AddressInfoList
|
AddressInfoList
|
||||||
Resolve(const char *host_port, unsigned default_port, int flags, int socktype)
|
Resolve(const char *host_port, unsigned default_port, int flags, int socktype)
|
||||||
{
|
{
|
||||||
addrinfo hints;
|
struct addrinfo hints{};
|
||||||
memset(&hints, 0, sizeof(hints));
|
|
||||||
hints.ai_flags = flags;
|
hints.ai_flags = flags;
|
||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = AF_UNSPEC;
|
||||||
hints.ai_socktype = socktype;
|
hints.ai_socktype = socktype;
|
||||||
|
Loading…
Reference in New Issue
Block a user