From 04ae5b84690b460f8093aab404b7f6cc567319f4 Mon Sep 17 00:00:00 2001 From: Manoj Ampalam Date: Mon, 7 Mar 2016 14:27:13 -0800 Subject: [PATCH] 3-7 C4 --- misc.c | 4 ++-- packet.c | 4 ++-- readpass.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/misc.c b/misc.c index f9a6efd..2bcb5ce 100644 --- a/misc.c +++ b/misc.c @@ -81,7 +81,7 @@ chop(char *s) int set_nonblock(int fd) { -#ifdef WIN32_FIXME +#if(0)//def WIN32_FIXME int on = 1; @@ -115,7 +115,7 @@ set_nonblock(int fd) int unset_nonblock(int fd) { -#ifdef WIN32_FIXME +#if(0)//def WIN32_FIXME int on = 0; diff --git a/packet.c b/packet.c index a98a4f4..0ae35fb 100644 --- a/packet.c +++ b/packet.c @@ -1314,7 +1314,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p) struct timeval timeout, start, *timeoutp = NULL; DBG(debug("packet_read()")); -#if(0)//ndef WIN32_FIXME +#if(1)//ndef WIN32_FIXME int d = howmany(state->connection_in + 1, NFDBITS); d = sizeof(fd_mask); setp = calloc(howmany(state->connection_in + 1, @@ -1354,7 +1354,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p) * Otherwise, wait for some data to arrive, add it to the * buffer, and try again. */ -#if(0)//ndef WIN32_FIXME +#if(1)//ndef WIN32_FIXME memset(setp, 0, howmany(state->connection_in + 1, NFDBITS) * sizeof(fd_mask)); #else diff --git a/readpass.c b/readpass.c index 473986a..5bd151f 100644 --- a/readpass.c +++ b/readpass.c @@ -335,7 +335,7 @@ read_passphrase(const char *prompt, int flags) * Show prompt for user. */ - write(STDERR_FILENO, prompt, strlen(prompt)); + write(STDOUT_FILENO, prompt, strlen(prompt)); len = retr = 0; int bufsize = sizeof(buf); @@ -368,7 +368,7 @@ read_passphrase(const char *prompt, int flags) } buf[len] = '\0' ; // get rid of the cr/lf - write(STDERR_FILENO,"\n", strlen("\n")); // show a newline as we do not echo password or the line + write(STDOUT_FILENO,"\n", strlen("\n")); // show a newline as we do not echo password or the line ret = xstrdup(buf);