diff options
author | Colin Watson <cjwatson@debian.org> | 2019-10-09 22:59:48 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-10-09 22:59:48 +0100 |
commit | 4213eec74e74de6310c27a40c3e9759a08a73996 (patch) | |
tree | e97a6dcafc6763aea7c804e4e113c2750cb1400d /mux.c | |
parent | 102062f825fb26a74295a1c089c00c4c4c76b68a (diff) | |
parent | cdf1d0a9f5d18535e0a18ff34860e81a6d83aa5c (diff) |
Import openssh_8.1p1.orig.tar.gz
Diffstat (limited to 'mux.c')
-rw-r--r-- | mux.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: mux.c,v 1.79 2019/01/19 21:35:25 djm Exp $ */ | 1 | /* $OpenBSD: mux.c,v 1.80 2019/06/28 13:35:04 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -1492,7 +1492,7 @@ mux_client_read(int fd, struct sshbuf *b, size_t need) | |||
1492 | return -1; | 1492 | return -1; |
1493 | } | 1493 | } |
1494 | len = read(fd, p + have, need - have); | 1494 | len = read(fd, p + have, need - have); |
1495 | if (len < 0) { | 1495 | if (len == -1) { |
1496 | switch (errno) { | 1496 | switch (errno) { |
1497 | #if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN) | 1497 | #if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN) |
1498 | case EWOULDBLOCK: | 1498 | case EWOULDBLOCK: |
@@ -1541,7 +1541,7 @@ mux_client_write_packet(int fd, struct sshbuf *m) | |||
1541 | return -1; | 1541 | return -1; |
1542 | } | 1542 | } |
1543 | len = write(fd, ptr + have, need - have); | 1543 | len = write(fd, ptr + have, need - have); |
1544 | if (len < 0) { | 1544 | if (len == -1) { |
1545 | switch (errno) { | 1545 | switch (errno) { |
1546 | #if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN) | 1546 | #if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN) |
1547 | case EWOULDBLOCK: | 1547 | case EWOULDBLOCK: |
@@ -2324,7 +2324,7 @@ muxclient(const char *path) | |||
2324 | fatal("ControlPath too long ('%s' >= %u bytes)", path, | 2324 | fatal("ControlPath too long ('%s' >= %u bytes)", path, |
2325 | (unsigned int)sizeof(addr.sun_path)); | 2325 | (unsigned int)sizeof(addr.sun_path)); |
2326 | 2326 | ||
2327 | if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) | 2327 | if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) == -1) |
2328 | fatal("%s socket(): %s", __func__, strerror(errno)); | 2328 | fatal("%s socket(): %s", __func__, strerror(errno)); |
2329 | 2329 | ||
2330 | if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) { | 2330 | if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) { |