X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnetutl.c;h=75950f05c865ee01700d06417dc5a2b0ea09279d;hb=f79cc0e0bba16a3aa42a5fa13098cda714623205;hp=983ad91485de40a5a6692a8c1613b16452a76e50;hpb=76c7550c8ab0e9c0ee14a9c396baa008cfb9bc42;p=meshlink diff --git a/src/netutl.c b/src/netutl.c index 983ad914..75950f05 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -1,6 +1,6 @@ /* netutl.c -- some supporting network utility code - Copyright (C) 2014 Guus Sliepen + Copyright (C) 2014-2017 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,7 +32,7 @@ bool hostnames = false; Return NULL on failure. */ struct addrinfo *str2addrinfo(const char *address, const char *service, int socktype) { - struct addrinfo *ai, hint = {0}; + struct addrinfo *ai, hint = {}; int err; hint.ai_family = addressfamily; @@ -49,8 +49,8 @@ struct addrinfo *str2addrinfo(const char *address, const char *service, int sock } sockaddr_t str2sockaddr(const char *address, const char *port) { - struct addrinfo *ai, hint = {0}; - sockaddr_t result = {{0}}; + struct addrinfo *ai, hint = {}; + sockaddr_t result = {}; int err; hint.ai_family = AF_UNSPEC;