summaryrefslogtreecommitdiffstats
path: root/clientloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/clientloop.c b/clientloop.c
index ccf8f4b8..7f32871f 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.325 2019/06/26 22:29:43 dtucker Exp $ */
+/* $OpenBSD: clientloop.c,v 1.326 2019/06/28 13:35:04 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -561,7 +561,7 @@ client_wait_until_can_do_something(struct ssh *ssh,
}
ret = select((*maxfdp)+1, *readsetp, *writesetp, NULL, tvp);
- if (ret < 0) {
+ if (ret == -1) {
/*
* We have to clear the select masks, because we return.
* We have to return, because the mainloop checks for the flags
@@ -644,11 +644,11 @@ client_process_net_input(struct ssh *ssh, fd_set *readset)
* There is a kernel bug on Solaris that causes select to
* sometimes wake up even though there is no data available.
*/
- if (len < 0 &&
+ if (len == -1 &&
(errno == EAGAIN || errno == EINTR || errno == EWOULDBLOCK))
len = 0;
- if (len < 0) {
+ if (len == -1) {
/*
* An error has encountered. Perhaps there is a
* network problem.
@@ -1096,7 +1096,7 @@ process_escapes(struct ssh *ssh, Channel *c,
/* Fork into background. */
pid = fork();
- if (pid < 0) {
+ if (pid == -1) {
error("fork: %.100s", strerror(errno));
continue;
}
@@ -2248,7 +2248,7 @@ client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,
struct winsize ws;
/* Store window size in the packet. */
- if (ioctl(in_fd, TIOCGWINSZ, &ws) < 0)
+ if (ioctl(in_fd, TIOCGWINSZ, &ws) == -1)
memset(&ws, 0, sizeof(ws));
channel_request_start(ssh, id, "pty-req", 1);