Proper struct initialization

Detected by clang -Wmissing-field-initializers
This commit is contained in:
thorkill 2015-06-29 23:30:18 +02:00
parent 7099a4437e
commit bc8dbfc9fd
12 changed files with 105 additions and 59 deletions

View file

@ -687,7 +687,11 @@ static bool add_listen_address(char *address, bool bindto) {
*address = 0;
}
struct addrinfo *ai, hint = {0};
struct addrinfo *ai, hint;
ai = NULL;
memset(&hint, 0x0, sizeof(struct addrinfo));
hint.ai_family = addressfamily;
hint.ai_socktype = SOCK_STREAM;
hint.ai_protocol = IPPROTO_TCP;