From: Gert Doering Date: Tue, 10 Nov 2015 21:17:03 +0000 (+0100) Subject: Fix FreeBSD-specific mishandling of gc arena pointer in create_arbitrary_remote() X-Git-Tag: v2.4_alpha1~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b33e1355765bbf83f4c8b744c442c7d98df808fa;p=thirdparty%2Fopenvpn.git Fix FreeBSD-specific mishandling of gc arena pointer in create_arbitrary_remote() ... and while at it, fix warning about losing "const" qualifier on return. Signed-off-by: Gert Doering Acked-by: Steffan Karger Message-Id: <1447190223-8065-1-git-send-email-gert@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/10478 --- diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 070fd1889..8139afc18 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -643,7 +643,7 @@ void delete_route_connected_v6_net(struct tuntap * tt, * is still point to point and no layer 2 resolution is done... */ -char * +const char * create_arbitrary_remote( struct tuntap *tt, struct gc_arena * gc ) { in_addr_t remote; @@ -652,7 +652,7 @@ create_arbitrary_remote( struct tuntap *tt, struct gc_arena * gc ) if ( remote == tt->local ) remote ++; - return print_in_addr_t (remote, 0, &gc); + return print_in_addr_t (remote, 0, gc); } #endif