X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fsubnet.c;h=12b78ef8ebee11612d0a8a1f515f8400373ae4bf;hp=a7312ba420902f7e8d42502d5dddbc35c72271e6;hb=85adeef21275633b78a234b2660cbe3bc9dd2c33;hpb=97ce045189e330e121873d1b4be1959c60062cbb diff --git a/src/subnet.c b/src/subnet.c index a7312ba4..12b78ef8 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: subnet.c,v 1.1.2.3 2000/10/11 22:01:02 guus Exp $ + $Id: subnet.c,v 1.1.2.4 2000/10/15 00:59:37 guus Exp $ */ #include "config.h" @@ -145,7 +145,7 @@ cp switch(subnet->type) { case SUBNET_MAC: - asprintf(netstr, "%d,%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", subnet->type, + asprintf(&netstr, "%d,%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", subnet->type, subnet->net.mac.address.x[0], subnet->net.mac.address.x[1], subnet->net.mac.address.x[2], @@ -153,9 +153,9 @@ cp subnet->net.mac.address.x[4], subnet->net.mac.address.x[5]); case SUBNET_IPV4: - asprintf(netstr, "%d,%lx:%lx", subnet->type, subnet->net.ipv4.address, subnet->net.ipv4.mask); + asprintf(&netstr, "%d,%lx:%lx", subnet->type, subnet->net.ipv4.address, subnet->net.ipv4.mask); case SUBNET_IPV6: - asprintf(netstr, "%d,%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx/%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx", + asprintf(&netstr, "%d,%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx/%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx", subnet->net.ipv6.address.x[0], subnet->net.ipv6.address.x[1], subnet->net.ipv6.address.x[2],