More SNtp debug 9

This commit is contained in:
Sergey Lyubka 2022-05-27 22:24:45 +01:00
parent 34c5f63c00
commit 6b50039863
2 changed files with 2 additions and 2 deletions

View File

@ -4394,7 +4394,7 @@ static void mg_iotest(struct mg_mgr *mgr, int ms) {
eSELECT_READ | eSELECT_EXCEPT | eSELECT_WRITE);
}
#elif MG_ENABLE_POLL
size_t n = 0;
nfds_t n = 0;
for (struct mg_connection *c = mgr->conns; c != NULL; c = c->next) n++;
struct pollfd fds[n == 0 ? 1 : n]; // Avoid zero-length VLA

View File

@ -476,7 +476,7 @@ static void mg_iotest(struct mg_mgr *mgr, int ms) {
eSELECT_READ | eSELECT_EXCEPT | eSELECT_WRITE);
}
#elif MG_ENABLE_POLL
size_t n = 0;
nfds_t n = 0;
for (struct mg_connection *c = mgr->conns; c != NULL; c = c->next) n++;
struct pollfd fds[n == 0 ? 1 : n]; // Avoid zero-length VLA