X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fconf.c;h=0b84ad71ee4a84aece0d2563c055a8ec74c7967a;hb=1c475ecb575367a6b3f9328b0f643ad636155341;hp=57065701f995d378a113fd1c19c7bcb35cc655a7;hpb=a6448291834ca7419553a807ee367c719c2956d0;p=tinc diff --git a/src/conf.c b/src/conf.c index 57065701..0b84ad71 100644 --- a/src/conf.c +++ b/src/conf.c @@ -203,7 +203,7 @@ bool get_config_address(const config_t *cfg, struct addrinfo **result) { } bool get_config_subnet(const config_t *cfg, subnet_t **result) { - subnet_t subnet = {NULL}; + subnet_t subnet = {0}; if(!cfg) { return false; @@ -433,7 +433,7 @@ bool read_server_config(void) { // And we try to read the ones that end with ".conf" if(l > 5 && !strcmp(".conf", & ep->d_name[ l - 5 ])) { - if(snprintf(fname, sizeof(fname), "%s" SLASH "%s", dname, ep->d_name) >= sizeof(fname)) { + if((size_t)snprintf(fname, sizeof(fname), "%s" SLASH "%s", dname, ep->d_name) >= sizeof(fname)) { logger(DEBUG_ALWAYS, LOG_ERR, "Pathname too long: %s/%s", dname, ep->d_name); return false; }