Fix autoconf check for function attributes.
[tinc] / src / invitation.c
index cc6cbd4..415c237 100644 (file)
@@ -84,7 +84,7 @@ char *get_my_hostname() {
        char *port = NULL;
        char *hostport = NULL;
        char *name = get_my_name(false);
-       char filename[PATH_MAX];
+       char filename[PATH_MAX] = {0};
 
        // Use first Address statement in own host config file
        if(check_id(name)) {
@@ -182,7 +182,7 @@ again:
        hostname = xstrdup(line);
 
 save:
-       if(filename) {
+       if(*filename) {
                FILE *f = fopen(filename, "a");
                if(f) {
                        fprintf(f, "\nAddress = %s\n", hostname);
@@ -551,7 +551,7 @@ make_names:
                confbase = NULL;
        }
 
-       make_names();
+       make_names(false);
 
        free(tinc_conf);
        free(hosts_dir);
@@ -756,7 +756,7 @@ ask_netname:
                }
 
                netname = line;
-               make_names();
+               make_names(false);
        }
 
        fprintf(stderr, "Configuration stored in: %s\n", confbase);