=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rsync/io.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- src/usr.bin/rsync/io.c 2019/05/08 21:30:11 1.17 +++ src/usr.bin/rsync/io.c 2019/06/28 13:35:03 1.18 @@ -1,4 +1,4 @@ -/* $Id: io.c,v 1.17 2019/05/08 21:30:11 benno Exp $ */ +/* $Id: io.c,v 1.18 2019/06/28 13:35:03 deraadt Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -40,7 +40,7 @@ pfd.fd = fd; pfd.events = POLLIN; - if (poll(&pfd, 1, 0) < 0) { + if (poll(&pfd, 1, 0) == -1) { ERR("poll"); return -1; } @@ -89,7 +89,7 @@ /* Now the non-blocking write. */ - if ((wsz = write(fd, buf, bsz)) < 0) { + if ((wsz = write(fd, buf, bsz)) == -1) { ERR("write"); return 0; } @@ -217,7 +217,7 @@ /* Now the non-blocking read, checking for EOF. */ - if ((rsz = read(fd, buf, bsz)) < 0) { + if ((rsz = read(fd, buf, bsz)) == -1) { ERR("read"); return 0; } else if (rsz == 0) {