X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fifconfig.c;h=c03fef4669b530a12d40671c39dceda09c442aa3;hp=0b99402bd5db7c554551fe8ad518ec441e9d9385;hb=3a316823b971396a428f020f401b9fe41252d98d;hpb=5822f817aa802c2c5a83e9d99a8ae78cb822799b diff --git a/src/ifconfig.c b/src/ifconfig.c index 0b99402b..c03fef46 100644 --- a/src/ifconfig.c +++ b/src/ifconfig.c @@ -88,7 +88,7 @@ static subnet_t ipv4, ipv6; void ifconfig_address(FILE *out, const char *value) { subnet_t address = {}; char address_str[MAXNETSTR]; - if(!str2net(&address, value) || !net2str(address_str, sizeof address_str, &address)) { + if(!str2net(&address, value) || !net2str(address_str, sizeof(address_str), &address)) { fprintf(stderr, "Could not parse address in Ifconfig statement\n"); return; } @@ -127,12 +127,12 @@ void ifconfig_route(FILE *out, const char *value) { char *sep = strchr(value, ' '); if(sep) *sep++ = 0; - if(!str2net(&subnet, value) || !net2str(subnet_str, sizeof subnet_str, &subnet) || subnet.type == SUBNET_MAC) { + if(!str2net(&subnet, value) || !net2str(subnet_str, sizeof(subnet_str), &subnet) || subnet.type == SUBNET_MAC) { fprintf(stderr, "Could not parse subnet in Route statement\n"); return; } if(sep) { - if(!str2net(&gateway, sep) || !net2str(gateway_str, sizeof gateway_str, &gateway) || gateway.type != subnet.type) { + if(!str2net(&gateway, sep) || !net2str(gateway_str, sizeof(gateway_str), &gateway) || gateway.type != subnet.type) { fprintf(stderr, "Could not parse gateway in Route statement\n"); return; } @@ -174,14 +174,14 @@ void ifconfig_route(FILE *out, const char *value) { fprintf(stderr, "Route requested but no Ifconfig\n"); return; } - net2str(gateway_str, sizeof gateway_str, &ipv4); + net2str(gateway_str, sizeof(gateway_str), &ipv4); break; case SUBNET_IPV6: if(!ipv6.type) { fprintf(stderr, "Route requested but no Ifconfig\n"); return; } - net2str(gateway_str, sizeof gateway_str, &ipv6); + net2str(gateway_str, sizeof(gateway_str), &ipv6); break; default: return; }