diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-11 00:18:11 +0100 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-11 00:18:11 +0100 |
commit | c791bebc2a0e15af332151502ca56c4d7f15ebc1 (patch) | |
tree | f1527f8a2a57b5e54f1a56c89e5fc01f5ca0ca62 /ssh-keyscan.c | |
parent | - itojun@cvs.openbsd.org 2001/02/08 19:30:52 (diff) | |
download | openssh-c791bebc2a0e15af332151502ca56c4d7f15ebc1.tar.xz openssh-c791bebc2a0e15af332151502ca56c4d7f15ebc1.zip |
- itojun@cvs.openbsd.org 2001/02/07 18:04:50
[ssh-keyscan.c]
fix size_t -> int cast (use u_long). markus ok
- markus@cvs.openbsd.org 2001/02/07 22:43:16
[ssh-keyscan.c]
s/getline/Linebuf_getline/; from roumen.petrov@skalasoft.com
- itojun@cvs.openbsd.org 2001/02/09 9:04:59
[ssh-keyscan.c]
do not assume malloc() returns zero-filled region. found by
malloc.conf=AJ.
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r-- | ssh-keyscan.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c index e48c0865e..834649fef 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -8,7 +8,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.12 2001/02/04 15:32:26 stevesk Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.15 2001/02/09 09:04:59 itojun Exp $"); #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) #include <sys/queue.h> @@ -146,7 +146,7 @@ Linebuf_lineno(Linebuf * lb) } static inline char * -getline(Linebuf * lb) +Linebuf_getline(Linebuf * lb) { int n = 0; @@ -490,7 +490,7 @@ conloop(void) seltime = c->c_tv; seltime.tv_sec -= now.tv_sec; seltime.tv_usec -= now.tv_usec; - if ((int) seltime.tv_usec < 0) { + if (seltime.tv_usec < 0) { seltime.tv_usec += 1000000; seltime.tv_sec--; } @@ -547,7 +547,7 @@ nexthost(int argc, char **argv) error("ignoring invalid/misplaced option `%s'", argv[argno++]); } else { char *line; - line = getline(lb); + line = Linebuf_getline(lb); if (line) return (line); Linebuf_free(lb); @@ -599,6 +599,7 @@ main(int argc, char **argv) if (maxfd > fdlim_get(0)) fdlim_set(maxfd); fdcon = xmalloc(maxfd * sizeof(con)); + memset(fdcon, 0, maxfd * sizeof(con)); do { while (ncon < maxcon) { |