stun

simple point to point tunnel
git clone git://git.2f30.org/stun
Log | Files | Refs | README

commit 5a0cc172c12ebc490bcc40268c681f1feda3490f
parent 18ceae2df397c6d9b2eab95b2550cf8f36430eb9
Author: sin <sin@2f30.org>
Date:   Fri,  8 Apr 2016 13:48:53 +0100

style fix

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

diff --git a/stun.c b/stun.c @@ -536,8 +536,7 @@ serversetup(int devfd) hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; - ret = getaddrinfo(bindaddr, port, &hints, &ai); - if (ret != 0) + if ((ret = getaddrinfo(bindaddr, port, &hints, &ai)) != 0) logerr("getaddrinfo: %s", gai_strerror(ret)); for (p = ai; p; p = p->ai_next) { @@ -599,8 +598,7 @@ clientsetup(int devfd) memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; - ret = getaddrinfo(host, port, &hints, &ai); - if (ret != 0) + if ((ret = getaddrinfo(host, port, &hints, &ai)) != 0) logerr("getaddrinfo: %s", gai_strerror(ret)); for (p = ai; p; p = p->ai_next) {