X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fsubnet_parse.c;h=611d6bd4415a83a2c4e99a921ce6f5c1df46aae8;hb=cda5a477c8138226d184a176256d559971b4f7ed;hp=c919b59a8eef028710498f77052ebb894c6ba350;hpb=5ffdff685a0e7d25f7c016f3a6cd89bb82fed71c;p=tinc diff --git a/src/subnet_parse.c b/src/subnet_parse.c index c919b59a..611d6bd4 100644 --- a/src/subnet_parse.c +++ b/src/subnet_parse.c @@ -401,11 +401,8 @@ bool net2str(char *netstr, int len, const subnet_t *subnet) { len -= result; } - if (subnet->weight != DEFAULT_WEIGHT) { + if (subnet->weight != DEFAULT_WEIGHT) snprintf(netstr, len, "#%d", subnet->weight); - netstr += result; - len -= result; - } return true; }