summaryrefslogtreecommitdiffstats
path: root/ssh-keyscan.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2004-06-15 02:35:30 +0200
committerDamien Miller <djm@mindrot.org>2004-06-15 02:35:30 +0200
commit232711f6dbc107711b3957bfa2fd798aec702241 (patch)
tree2dfcd276712caa022fd8aa2f3c1319c13660fdd7 /ssh-keyscan.c
parent - djm@cvs.openbsd.org 2004/06/13 15:03:02 (diff)
downloadopenssh-232711f6dbc107711b3957bfa2fd798aec702241.tar.xz
openssh-232711f6dbc107711b3957bfa2fd798aec702241.zip
- djm@cvs.openbsd.org 2004/06/14 01:44:39
[channels.c clientloop.c misc.c misc.h packet.c ssh-agent.c ssh-keyscan.c] [sshd.c] set_nonblock() instead of fnctl(...,O_NONBLOCK); "looks sane" deraadt@
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r--ssh-keyscan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index c4a2414b1..01615b5c3 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -7,7 +7,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keyscan.c,v 1.48 2004/06/13 12:53:24 djm Exp $");
+RCSID("$OpenBSD: ssh-keyscan.c,v 1.49 2004/06/14 01:44:39 djm Exp $");
#include "openbsd-compat/sys-queue.h"
@@ -397,8 +397,8 @@ tcpconnect(char *host)
error("socket: %s", strerror(errno));
continue;
}
- if (fcntl(s, F_SETFL, O_NONBLOCK) < 0)
- fatal("F_SETFL: %s", strerror(errno));
+ if (set_nonblock(s) == -1)
+ fatal("%s: set_nonblock(%d)", __func__, s);
if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0 &&
errno != EINPROGRESS)
error("connect (`%s'): %s", host, strerror(errno));