if(!net2str(netstr, sizeof netstr, subnet))
continue;
// Strip the weight from the subnet, and put it in its own environment variable
- char *weight = strchr(netstr + 7, '#');
+ char *weight = strchr(netstr, '#');
if(weight)
*weight++ = 0;
else
execute_script(name, envp);
}
} else {
- if(net2str(netstr + 7, sizeof netstr - 7, subnet)) {
+ if(net2str(netstr, sizeof netstr, subnet)) {
// Strip the weight from the subnet, and put it in its own environment variable
- char *weight = strchr(netstr + 7, '#');
+ char *weight = strchr(netstr, '#');
if(weight)
*weight++ = 0;
else