term: use SIZE_MAX instead of (size_t)-1ll

This commit is contained in:
Daniel Eklöf 2022-10-09 16:14:49 +02:00
parent 18ef36523f
commit 66e4592d91
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -7,6 +7,7 @@
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <limits.h>
#include <sys/stat.h>
#include <sys/wait.h>
@ -268,7 +269,7 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
}
uint8_t buf[24 * 1024];
const size_t max_iterations = !hup ? 10 : (size_t)-1ll;
const size_t max_iterations = !hup ? 10 : SIZE_MAX;
for (size_t i = 0; i < max_iterations && pollin; i++) {
xassert(pollin);