diff options
Diffstat (limited to 'libc')
-rw-r--r-- | libc/inet/hostid.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libc/inet/hostid.c b/libc/inet/hostid.c index 4ddfbd123..5977ada25 100644 --- a/libc/inet/hostid.c +++ b/libc/inet/hostid.c @@ -61,8 +61,7 @@ long int gethostid(void) * Mitch */ if (gethostname(host, HOST_NAME_MAX) >= 0 && *host) { - struct addrinfo hints, *results, *addr; - memset(&hints, 0, sizeof(struct addrinfo)); + struct addrinfo hints = {.ai_family = AF_INET}, *results, *addr; if (!getaddrinfo(host, NULL, &hints, &results)) { for (addr = results; addr; addr = results->ai_next) { /* Just so it doesn't look exactly like the |