Check if the compiler knows about the __malloc__ attribute.
[tinc] / src / net_setup.c
index 6f7f70a..5bbaa79 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id: net_setup.c,v 1.1.2.39 2003/07/23 22:17:31 guus Exp $
+    $Id: net_setup.c,v 1.1.2.41 2003/07/30 11:50:45 guus Exp $
 */
 
 #include "system.h"
@@ -202,7 +202,7 @@ bool setup_myself(void)
        char *name, *hostname, *mode, *afname, *cipher, *digest;
        char *address = NULL;
        char *envp[5];
-       struct addrinfo hint, *ai, *aip;
+       struct addrinfo *ai, *aip, hint = {0};
        bool choice;
        int i, err;
 
@@ -444,8 +444,6 @@ bool setup_myself(void)
 
        /* Open sockets */
 
-       memset(&hint, 0, sizeof(hint));
-
        get_config_string(lookup_config(config_tree, "BindToAddress"), &address);
 
        hint.ai_family = addressfamily;