mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-17 06:46:21 -04:00
term: reduce scope of variable
This commit is contained in:
parent
b1a4d43845
commit
d126662560
1 changed files with 1 additions and 3 deletions
|
|
@ -230,13 +230,11 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t buf[24 * 1024];
|
uint8_t buf[24 * 1024];
|
||||||
ssize_t count = sizeof(buf);
|
|
||||||
|
|
||||||
const size_t max_iterations = !hup ? 10 : (size_t)-1ll;
|
const size_t max_iterations = !hup ? 10 : (size_t)-1ll;
|
||||||
|
|
||||||
for (size_t i = 0; i < max_iterations && pollin; i++) {
|
for (size_t i = 0; i < max_iterations && pollin; i++) {
|
||||||
xassert(pollin);
|
xassert(pollin);
|
||||||
count = read(term->ptmx, buf, sizeof(buf));
|
ssize_t count = read(term->ptmx, buf, sizeof(buf));
|
||||||
|
|
||||||
if (count < 0) {
|
if (count < 0) {
|
||||||
if (errno == EAGAIN || errno == EIO) {
|
if (errno == EAGAIN || errno == EIO) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue