Remove unused code that caused warnings about an uninitialized variable.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 12 Jul 2015 10:55:13 +0000 (12:55 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 12 Jul 2015 10:55:13 +0000 (12:55 +0200)
src/subnet_parse.c

index c919b59..611d6bd 100644 (file)
@@ -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;
 }