projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Explain how tinc detaches and how it is "killed" under Windows.
[tinc]
/
src
/
netutl.c
diff --git
a/src/netutl.c
b/src/netutl.c
index
cd50792
..
ef9a660
100644
(file)
--- a/
src/netutl.c
+++ b/
src/netutl.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.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: netutl.c,v 1.12.4.
49 2003/07/24 12:08:1
5 guus Exp $
+ $Id: netutl.c,v 1.12.4.
51 2003/07/30 11:50:4
5 guus Exp $
*/
#include "system.h"
*/
#include "system.h"
@@
-36,13
+36,11
@@
bool hostnames = false;
*/
struct addrinfo *str2addrinfo(const char *address, const char *service, int socktype)
{
*/
struct addrinfo *str2addrinfo(const char *address, const char *service, int socktype)
{
- struct addrinfo
hint, *ai
;
+ struct addrinfo
*ai, hint = {0}
;
int err;
cp();
int err;
cp();
- memset(&hint, 0, sizeof(hint));
-
hint.ai_family = addressfamily;
hint.ai_socktype = socktype;
hint.ai_family = addressfamily;
hint.ai_socktype = socktype;
@@
-59,14
+57,12
@@
struct addrinfo *str2addrinfo(const char *address, const char *service, int sock
sockaddr_t str2sockaddr(const char *address, const char *port)
{
sockaddr_t str2sockaddr(const char *address, const char *port)
{
- struct addrinfo
hint, *ai
;
+ struct addrinfo
*ai, hint = {0}
;
sockaddr_t result;
int err;
cp();
sockaddr_t result;
int err;
cp();
- memset(&hint, 0, sizeof(hint));
-
hint.ai_family = AF_UNSPEC;
hint.ai_flags = AI_NUMERICHOST;
hint.ai_socktype = SOCK_STREAM;
hint.ai_family = AF_UNSPEC;
hint.ai_flags = AI_NUMERICHOST;
hint.ai_socktype = SOCK_STREAM;