Mercurial > dropbear
diff common-channel.c @ 433:c216212001fc
Fix for -pedantic -ansi compilation, change // to /**/, plus some signedness
and trailing-comma-in-array issues
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 16 Feb 2007 14:42:08 +0000 |
parents | b2b67cfcd66e |
children | ab370c629d36 |
line wrap: on
line diff
--- a/common-channel.c Tue Feb 13 10:30:02 2007 +0000 +++ b/common-channel.c Fri Feb 16 14:42:08 2007 +0000 @@ -461,7 +461,7 @@ FD_SET(channel->writefd, writefds); } - if (ERRFD_IS_WRITE(channel) != NULL && channel->errfd >= 0 + if (ERRFD_IS_WRITE(channel) && channel->errfd >= 0 && cbuf_getused(channel->extrabuf) > 0 ) { FD_SET(channel->errfd, writefds); } @@ -640,7 +640,7 @@ /* If we receive less data than we requested when flushing, we've reached the equivalent of EOF */ - if (channel->flushing && len < maxlen) + if (channel->flushing && len < (ssize_t)maxlen) { TRACE(("closing from channel, flushing out.")) close_chan_fd(channel, fd, SHUT_RD);