summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-07-12 17:12:29 +1000
committerDamien Miller <djm@mindrot.org>2008-07-12 17:12:29 +1000
commit2bcb866327ed909916c77bcb36fd4770b09fe534 (patch)
treedc214574e4310c59bb6714d715ee461bee95b8c1 /channels.c
parentb61f3fc31ff6eb1693431e21fb1086c33eb66549 (diff)
- (djm) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2008/07/12 04:52:50 [channels.c] unbreak; move clearing of cctx struct to before first use reported by dkrause@
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels.c b/channels.c
index 9f27fa632..7be577838 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.283 2008/07/10 18:05:58 markus Exp $ */ 1/* $OpenBSD: channels.c,v 1.284 2008/07/12 04:52:50 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2865,6 +2865,7 @@ connect_to(const char *host, u_short port, char *ctype, char *rname)
2865 struct channel_connect cctx; 2865 struct channel_connect cctx;
2866 Channel *c; 2866 Channel *c;
2867 2867
2868 memset(&cctx, 0, sizeof(cctx));
2868 memset(&hints, 0, sizeof(hints)); 2869 memset(&hints, 0, sizeof(hints));
2869 hints.ai_family = IPv4or6; 2870 hints.ai_family = IPv4or6;
2870 hints.ai_socktype = SOCK_STREAM; 2871 hints.ai_socktype = SOCK_STREAM;
@@ -2875,7 +2876,6 @@ connect_to(const char *host, u_short port, char *ctype, char *rname)
2875 return NULL; 2876 return NULL;
2876 } 2877 }
2877 2878
2878 memset(&cctx, 0, sizeof(cctx));
2879 cctx.host = xstrdup(host); 2879 cctx.host = xstrdup(host);
2880 cctx.port = port; 2880 cctx.port = port;
2881 cctx.ai = cctx.aitop; 2881 cctx.ai = cctx.aitop;