X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fsubnet_parse.c;h=f980180019d0a42fd7429fbde65ccaf4a2306167;hb=d917c8cb6b69475d568ccbe82389b9f2b3eb5e80;hp=a3c904f5945ae8ca4693e80ff9bff3de30f74ff3;hpb=3c7003893fe2f82023d0d4f54b488bb7a16d0007;p=tinc diff --git a/src/subnet_parse.c b/src/subnet_parse.c index a3c904f5..f9801800 100644 --- a/src/subnet_parse.c +++ b/src/subnet_parse.c @@ -104,7 +104,7 @@ static int subnet_compare_mac(const subnet_t *a, const subnet_t *b) { if(result) return result; - + result = a->weight - b->weight; if(result || !a->owner || !b->owner) @@ -125,7 +125,7 @@ static int subnet_compare_ipv4(const subnet_t *a, const subnet_t *b) { if(result) return result; - + result = a->weight - b->weight; if(result || !a->owner || !b->owner) @@ -141,12 +141,12 @@ static int subnet_compare_ipv6(const subnet_t *a, const subnet_t *b) { if(result) return result; - + result = memcmp(&a->net.ipv6.address, &b->net.ipv6.address, sizeof(ipv6_t)); if(result) return result; - + result = a->weight - b->weight; if(result || !a->owner || !b->owner) @@ -194,7 +194,7 @@ bool str2net(subnet_t *subnet, const char *subnetstr) { subnet->net.ipv4.prefixlength = l; subnet->weight = weight; - for(i = 0; i < 4; i++) { + for(int i = 0; i < 4; i++) { if(x[i] > 255) return false; subnet->net.ipv4.address.x[i] = x[i];