Convert a do {} while into a while

This commit is contained in:
Todd C. Miller
2009-09-27 22:11:11 +00:00
parent 672d0f592e
commit 577fb346fd

View File

@@ -497,13 +497,13 @@ script_execv(path, argv)
n &= ~O_NONBLOCK;
(void) fcntl(STDOUT_FILENO, F_SETFL, n);
}
do {
while (output.len > output.off) {
n = write(STDOUT_FILENO, output.buf + output.off,
output.len - output.off);
if (n <= 0)
break;
output.off += n;
} while (output.len > output.off);
}
/* Make sure there is no output remaining on the master pty. */
for (;;) {