diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2004-08-11 21:44:33 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2004-08-11 21:44:33 +0000 |
commit | 093af044ac57a48937832286b3f0e8a5b495ef04 (patch) | |
tree | 065c3cfc0480c798e6d69ab157a6bbd73c9ade82 /usr.bin/ssh/ssh-keyscan.c | |
parent | 1e8f8d3cdc3218b79cb25e1b4f8c10ef9145ee74 (diff) |
use atomicio instead of homegrown equivalents or read/write.
markus@ ok
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index 9bb4134dbc1..85db4083ad1 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.49 2004/06/14 01:44:39 djm Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.50 2004/08/11 21:44:32 avsm Exp $"); #include <sys/queue.h> #include <errno.h> @@ -485,7 +485,7 @@ congreet(int s) bufsiz = sizeof(buf); cp = buf; - while (bufsiz-- && (n = read(s, cp, 1)) == 1 && *cp != '\n') { + while (bufsiz-- && (n = atomicio(read, s, cp, 1)) == 1 && *cp != '\n') { if (*cp == '\r') *cp = '\n'; cp++; @@ -551,7 +551,7 @@ conread(int s) congreet(s); return; } - n = read(s, c->c_data + c->c_off, c->c_len - c->c_off); + n = atomicio(read, s, c->c_data + c->c_off, c->c_len - c->c_off); if (n < 0) { error("read (%s): %s", c->c_name, strerror(errno)); confree(s); |