warp-vpn

point to point VPN implementation
git clone git://git.2f30.org/warp-vpn
Log | Files | Refs | README

commit 060e651d5ab6194e8986c3b0bcc095d93deda628
parent acbdc8a1c66824541ddd39a07b8b8ca1c97ee828
Author: sin <sin@2f30.org>
Date:   Thu, 14 Apr 2016 12:04:56 +0100

style fix

Diffstat:
Mutil.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/util.c b/util.c @@ -104,9 +104,8 @@ char * peer_ntop(int fd) { struct sockaddr_storage ss; - socklen_t sslen; + socklen_t sslen = sizeof(ss); - sslen = sizeof(ss); if (getpeername(fd, (struct sockaddr *)&ss, &sslen) < 0) { logwarn("getpeername failed"); return NULL; @@ -117,9 +116,8 @@ peer_ntop(int fd) int ipversion(unsigned char *pkt) { - struct ip *ip; + struct ip *ip = (struct ip *)pkt; - ip = (struct ip *)pkt; switch (ip->ip_v) { case 4: return AF_INET;